Skip to content

Commit c09af5a

Browse files
fix: correct table definitions for recipe instructions and nutritional info
1 parent 67eafea commit c09af5a

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
DROP TABLE IF EXISTS tb_recipes_instructions;
22

3-
CREATE TABLE tb_recipe_instructions (
4-
recipe_id BIGINT NOT NULL,
5-
step_order INT NOT NULL,
6-
instructions TEXT NOT NULL,
3+
CREATE TABLE tb_recipe_instructions
4+
(
5+
recipe_id BIGINT NOT NULL,
6+
step_order INT NOT NULL,
7+
instruction TEXT NOT NULL,
78
PRIMARY KEY (recipe_id, step_order),
8-
FOREIGN KEY (recipe_id) REFERENCES tb_recipes(id) ON DELETE CASCADE
9+
FOREIGN KEY (recipe_id) REFERENCES tb_recipes (id) ON DELETE CASCADE
910
);
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
DROP TABLE IF EXISTS tb_recipes_instructions;
1+
DROP TABLE IF EXISTS tb_recipes_nutritional_info;
22

3-
CREATE TABLE tb_recipes_nutritional_info (
4-
recipe_id BIGINT NOT NULL,
5-
nutritional_info TEXT NOT NULL,
6-
foreign key (recipe_id) references tb_recipes(id) ON DELETE CASCADE
3+
CREATE TABLE tb_recipes_nutritional_info
4+
(
5+
recipe_id BIGINT NOT NULL,
6+
nutritional_info TEXT NOT NULL,
7+
foreign key (recipe_id) references tb_recipes (id) ON DELETE CASCADE
78

89
);

0 commit comments

Comments
 (0)