This repository has been archived by the owner on Jun 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Schema
Gary Graham edited this page May 9, 2013
·
2 revisions
CREATE TABLE [T_CANISTER] (
[canister_id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
[ingredient_id] INTEGER NULL,
[liquid_capacity] INTEGER NULL,
[liquid_remaning] INTEGER NULL
);
CREATE TABLE [T_DISPENSE] (
[dispense_id] INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
[drink_id] INTEGER NOT NULL,
[dispense_timestamp] TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
);
CREATE TABLE [T_DRINK] (
[drink_id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
[drink_name] TEXT NULL,
[description] TEXT NULL,
[garnish] TEXT NULL,
[upvotes] INTEGER NULL,
[downvotes] INTEGER NULL,
[dispense_count] INTEGER NULL,
[cost] FLOAT NULL,
[image_path] TEXT NULL
);
CREATE TABLE [T_INGREDIENT] (
[ingredient_id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
[ingredient_name] TEXT NULL
);
CREATE TABLE [T_INGREDIENT_INSTANCE] (
[instance_id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
[drink_id] INTEGER NOT NULL,
[ingredient_id] INTEGER NOT NULL,
[amount] INTEGER NOT NULL
);