Skip to content

Commit

Permalink
edit: added some default values
Browse files Browse the repository at this point in the history
Took 3 minutes
  • Loading branch information
SirojiddinSaidmurodov committed Nov 25, 2020
1 parent 7f246d9 commit cfa1661
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/resources/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS `orders`
`id` SERIAL,
`waiterID` BIGINT UNSIGNED NOT NULL,
`tableID` INT,
`ready` BOOLEAN,
`ready` BOOLEAN DEFAULT FALSE,
PRIMARY KEY (`id`),
FOREIGN KEY (`waiterID`) REFERENCES `user` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
);
Expand All @@ -23,14 +23,14 @@ CREATE TABLE IF NOT EXISTS meal
`id` SERIAL PRIMARY KEY,
`mealName` CHAR(50),
`mealCost` INT,
`mealAvailable` BOOLEAN
`mealAvailable` BOOLEAN DEFAULT FALSE
);
CREATE TABLE IF NOT EXISTS `orderItems`
(
`id` SERIAL,
`mealID` BIGINT UNSIGNED NOT NULL,
`orderID` BIGINT UNSIGNED NOT NULL,
`quantity` TINYINT,
`quantity` TINYINT DEFAULT 1,
PRIMARY KEY (`id`),
FOREIGN KEY (`mealID`) REFERENCES `meal` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`orderID`) REFERENCES `orders` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
Expand Down

0 comments on commit cfa1661

Please sign in to comment.