From 2a79043e4b33118437b3ade35a792b9e0d1323be Mon Sep 17 00:00:00 2001
From: Jeffrey Armstrong <jeff@approximatrix.com>
Date: Thu, 25 Mar 2021 16:50:32 -0400
Subject: Started on server components.  Implemented thin, only-necessary
 sqlite wrapping in Fortran.

---
 captain/sql/create.sql | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 captain/sql/create.sql

(limited to 'captain/sql/create.sql')

diff --git a/captain/sql/create.sql b/captain/sql/create.sql
new file mode 100644
index 0000000..d78c90c
--- /dev/null
+++ b/captain/sql/create.sql
@@ -0,0 +1,10 @@
+
+CREATE TABLE players(id INTEGER PRIMARY KEY, name TEXT NOT NULL, token TEXT NOT NULL);
+
+CREATE TABLE jobs(id INTEGER PRIMARY KEY, player INTEGER DEFAULT NULL, status INTEGER, FOREIGN KEY(player) REFERENCES players(id));
+
+CREATE TABLE tasks(job INTEGER, task INTEGER, status INTEGER, FOREIGN KEY(job) REFERENCES jobs(id));
+
+CREATE TABLE instructions(id INTEGER PRIMARY KEY, name TEXT NOT NULL, file TEXT NOT NULL);
+
+CREATE_TABLE available(instructions INTEGER, player INTEGER, FOREIGN KEY(instructions) REFERENCES instructions(id), FOREIGN KEY(player) REFERENCES players(id));
-- 
cgit v1.2.3

