From 780917069d15b97668827a26e6527f1fe19d90df Mon Sep 17 00:00:00 2001 From: Ivan Bogosavljevic <136277150+Nuvve@users.noreply.github.com> Date: Tue, 16 Apr 2024 22:40:30 +0200 Subject: [PATCH] =?UTF-8?q?Fick=20problem=20n=C3=A4r=20tablen=20hette=20Or?= =?UTF-8?q?der=20bytte=20till=20Orders=20ist=C3=A4llet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sqlCode | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sqlCode b/sqlCode index 5571df5..2205047 100644 --- a/sqlCode +++ b/sqlCode @@ -3,7 +3,7 @@ DROP TABLE IF EXISTS Recipe; DROP TABLE IF EXISTS Ingredient; DROP TABLE IF EXISTS Cookie; DROP TABLE IF EXISTS Pallet; -DROP TABLE IF EXISTS Order; +DROP TABLE IF EXISTS Orders; DROP TABLE IF EXISTS Customer; CREATE TABLE Customer ( @@ -12,7 +12,7 @@ CREATE TABLE Customer ( address VARCHAR(255) ); -CREATE TABLE Order ( +CREATE TABLE Orders ( order_id INT AUTO_INCREMENT PRIMARY KEY, customer_id INT, delivery_date DATE, @@ -26,7 +26,7 @@ CREATE TABLE Pallet ( manufacture_date DATE, delivery_date DATE, blocked BOOLEAN, - FOREIGN KEY (order_id) REFERENCES Order(order_id) + FOREIGN KEY (order_id) REFERENCES Orders(order_id) ); CREATE TABLE Cookie ( @@ -41,7 +41,7 @@ CREATE TABLE OrderSpec ( cookie_id INT, quantity INT, PRIMARY KEY (order_id, cookie_id), - FOREIGN KEY (order_id) REFERENCES Order(order_id), + FOREIGN KEY (order_id) REFERENCES Orders(order_id), FOREIGN KEY (cookie_id) REFERENCES Cookie(cookie_id) );