updates table schema

This commit is contained in:
2019-06-21 13:57:36 +02:00
parent 472e24a62c
commit 0f77a16a8c
10 changed files with 50 additions and 26 deletions

View File

@@ -1,2 +1,3 @@
DROP TABLE items;
DROP TABLE looted;

View File

@@ -1,5 +1,15 @@
-- The global inventory of items
CREATE TABLE items (
id INTEGER PRIMARY KEY NOT NULL,
name VARCHAR NOT NULL,
base_price INTEGER NOT NULL
);
-- The items that have been looted
CREATE TABLE looted (
id INTEGER PRIMARY KEY NOT NULL,
name VARCHAR NOT NULL,
base_price INTEGER NOT NULL,
owner_id INTEGER NOT NULL,
FOREIGN KEY (owner_id) REFERENCES players(id)
);