-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.sql
More file actions
14 lines (13 loc) · 754 Bytes
/
database.sql
File metadata and controls
14 lines (13 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
CREATE TABLE public.recipee (
cooking_instructions varchar(255) NULL,
description varchar(255) NULL,
"name" varchar(255) NOT NULL,
CONSTRAINT recipee_pkey PRIMARY KEY ("name")
);
CREATE TABLE public.ingredient (
name varchar(255) NOT NULL,
quantity varchar(255) NULL,
recipee_name varchar(255) NOT NULL,
CONSTRAINT ingredient_pkey PRIMARY KEY (name, recipee_name),
CONSTRAINT fk_recipee FOREIGN KEY (recipee_name) REFERENCES public.recipee("name")
);