diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-03-25 16:50:32 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-03-25 16:50:32 -0400 |
commit | 2a79043e4b33118437b3ade35a792b9e0d1323be (patch) | |
tree | ea2e50b8a624543b59ab8a0da7b3a630dd9143f0 /captain/sql | |
parent | 1545914afff13e37bfcfee1b04828942e430a819 (diff) | |
download | levitating-2a79043e4b33118437b3ade35a792b9e0d1323be.tar.gz levitating-2a79043e4b33118437b3ade35a792b9e0d1323be.zip |
Started on server components. Implemented thin, only-necessary sqlite wrapping in Fortran.
Diffstat (limited to 'captain/sql')
-rw-r--r-- | captain/sql/create.sql | 10 |
1 files changed, 10 insertions, 0 deletions
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)); |