init rust db backend

This commit is contained in:
2019-06-11 16:14:10 +02:00
parent ba1792ef55
commit 4454bd245c
16 changed files with 204 additions and 2 deletions

View File

@@ -0,0 +1 @@
DROP TABLE looted;

View File

@@ -0,0 +1,8 @@
CREATE TABLE looted (
id INTEGER PRIMARY KEY,
player_id INTEGER NOT NULL,
item_id INTEGER NOT NULL,
acquired_date DATE DEFAULT NOW,
FOREIGN KEY (player_id) REFERENCES players(id),
FOREIGN KEY (item_id) REFERENCES items(id)
);