Files
lootalot/lootalot_db/migrations/2019-06-10-123922_create_items/up.sql
2020-01-09 13:25:36 +01:00

17 lines
352 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 loot
CREATE TABLE loot (
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)
);