From e241613a151ea438a2e6faaa3cf141ed5f1ef76f Mon Sep 17 00:00:00 2001 From: Ivan Bogosavljevic <136277150+Nuvve@users.noreply.github.com> Date: Wed, 17 Apr 2024 23:30:01 +0200 Subject: [PATCH] Update sqlCode --- sqlCode | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sqlCode b/sqlCode index 9a1dfff..26d3a9f 100644 --- a/sqlCode +++ b/sqlCode @@ -7,17 +7,16 @@ DROP TABLE IF EXISTS Orders; DROP TABLE IF EXISTS Customer; CREATE TABLE Customer ( - customer_id INT AUTO_INCREMENT PRIMARY KEY, - name VARCHAR(255), + name VARCHAR(255) PRIMARY KEY, address VARCHAR(255) ); CREATE TABLE Orders ( order_id INT AUTO_INCREMENT PRIMARY KEY, - customer_id INT, + customer_name VARCHAR(255), delivery_date DATE, order_date DATE, - FOREIGN KEY (customer_id) REFERENCES Customer(customer_id) + FOREIGN KEY (customer_name) REFERENCES Customer(name) ); CREATE TABLE Cookie (