From 8b1560dbbf7b0de29f59b0bae9567afb146996e6 Mon Sep 17 00:00:00 2001 From: Ivonne Date: Thu, 30 Nov 2023 16:12:54 -0500 Subject: [PATCH] Update files --- data/game.json | 2 +- database/schema.sql | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/data/game.json b/data/game.json index ea32747..dbeab42 100644 --- a/data/game.json +++ b/data/game.json @@ -1,2 +1,2 @@ [{"publish_date":"2023-01-02","multiplayer":true,"last_played_at":"2023-10-10"}, -{"publish_date":"2023-11-11","multiplayer":true,"last_played_at":"2023-11-02"}] \ No newline at end of file +{"publish_date":"2005-04-23","multiplayer":true,"last_played_at":"2007-05-06"}] \ No newline at end of file diff --git a/database/schema.sql b/database/schema.sql index d8a695d..e00f05c 100644 --- a/database/schema.sql +++ b/database/schema.sql @@ -26,3 +26,21 @@ CREATE TABLE book( item_id INTEGER, FOREIGN KEY(item_id) REFERENCES items(id) ); + + +CREATE TABLE author( + id SERIAL PRIMARY KEY, + first_name VARCHAR(100), + last_name VARCHAR(100), +); + +CREATE TABLE game( + id INTEGER PRIMARY KEY, + multiplayer BOOLEAN, + last_played_at DATE, + item_id INTEGER, + FOREIGN KEY(item_id) REFERENCES items(id) +); + +CREATE INDEX idx_book_item_id ON book(item_id); +CREATE INDEX idx_item_label_id ON item(label_id);