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