Files
lootalot/lootalot_db/migrations/2019-06-10-123922_create_items/up.sql
2019-06-21 13:57:36 +02:00

16 lines
376 B
SQL

-- 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)
);