Skip to content

Commit

Permalink
Merge branch 'main' into chartwells_api_script
Browse files Browse the repository at this point in the history
  • Loading branch information
That-Thing committed Nov 1, 2024
2 parents 986e1a6 + d4481d5 commit d203aac
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/main/resources/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CREATE TABLE IF NOT EXISTS locations (
);

CREATE TABLE IF NOT EXISTS accounts (
username TEXT NOT NULL,
username TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
uid INTEGER PRIMARY KEY AUTOINCREMENT
);
Expand Down Expand Up @@ -88,3 +88,16 @@ INSERT INTO locations(name, apiUUID) VALUES
('Wadsworth', '64b9990ec625af0685fb939d'),
('McNair', '64a6b628351d5305dde2bc08'),
('DHH', '64e3da15e45d430b80c9b981');
FOREIGN KEY (location) REFERENCES location(name)
);

CREATE TABLE IF NOT EXISTS ratings (
menuItemName TEXT,
menuItemLocation TEXT,
accountUsername TEXT,
rating INTEGER,
PRIMARY KEY (menuItemName, accountUsername),
FOREIGN KEY (menuItemName) REFERENCES menuItems(name),
FOREIGN KEY (menuItemLocation) REFERENCES menuItems(location),
FOREIGN KEY (accountUsername) REFERENCES accounts(username)
);

0 comments on commit d203aac

Please sign in to comment.