From dc94c46beafd3b33ed8b5fa1deead851a14aa202 Mon Sep 17 00:00:00 2001 From: osaajani Date: Fri, 8 Nov 2019 18:21:34 +0100 Subject: [PATCH] fix group name column error mysql --- createDatabase.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/createDatabase.sql b/createDatabase.sql index 063d00b..fdd13ee 100755 --- a/createDatabase.sql +++ b/createDatabase.sql @@ -60,7 +60,7 @@ CREATE TABLE IF NOT EXISTS contact UNIQUE (name) ); -CREATE TABLE IF NOT EXISTS group +CREATE TABLE IF NOT EXISTS `group` ( id INT NOT NULL AUTO_INCREMENT, id_user INT NOT NULL, @@ -76,7 +76,7 @@ CREATE TABLE IF NOT EXISTS group_contact id_group INT NOT NULL, id_contact INT NOT NULL, PRIMARY KEY (id), - FOREIGN KEY (id_group) REFERENCES group (id) ON DELETE CASCADE ON UPDATE CASCADE, + FOREIGN KEY (id_group) REFERENCES `group` (id) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY (id_contact) REFERENCES contact (id) ON DELETE CASCADE ON UPDATE CASCADE ); @@ -97,7 +97,7 @@ CREATE TABLE IF NOT EXISTS scheduled_group id_group INT NOT NULL, PRIMARY KEY (id), FOREIGN KEY (id_scheduled) REFERENCES scheduled (id) ON DELETE CASCADE ON UPDATE CASCADE, - FOREIGN KEY (id_group) REFERENCES group (id) ON DELETE CASCADE ON UPDATE CASCADE + FOREIGN KEY (id_group) REFERENCES `group` (id) ON DELETE CASCADE ON UPDATE CASCADE ); CREATE TABLE IF NOT EXISTS scheduled_number