Skip to content
Snippets Groups Projects
Commit 39cec6bd authored by Pedro Pablo Cardona Arroyave's avatar Pedro Pablo Cardona Arroyave
Browse files

Wastes table was added to the dbschema

parent 07f9157e
No related branches found
No related tags found
No related merge requests found
......@@ -121,6 +121,14 @@ CREATE TABLE favorite(
CONSTRAINT PK_recipe_user PRIMARY KEY (recipe_id,username),
FOREIGN KEY (recipe_id) REFERENCES recipe(recipe_id),
FOREIGN KEY (username) REFERENCES users(username)
)
);
CREATE TABLE WASTES(
waste_id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
group_id BIGINT NOT NULL,
ean BIGINT NOT NULL,
timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
amount DOUBLE NOT NULL,
FOREIGN KEY (group_id) references groups(group_id),
FOREIGN KEY (ean) references product(ean)
)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment