From fd4e8bb53ee8a4fe6b5259fcdef2f64367d3c96d Mon Sep 17 00:00:00 2001 From: jakobsn Date: Tue, 12 Nov 2019 12:13:35 +0100 Subject: [PATCH 1/2] remove guestbook --- mysql/sql/init.sql | 8 -------- 1 file changed, 8 deletions(-) diff --git a/mysql/sql/init.sql b/mysql/sql/init.sql index 670764e..cdadd43 100644 --- a/mysql/sql/init.sql +++ b/mysql/sql/init.sql @@ -14,12 +14,6 @@ CREATE TABLE users ( PRIMARY KEY (userid) ); -CREATE TABLE guestbook ( - entryid INT UNSIGNED AUTO_INCREMENT, - text VARCHAR(255) NOT NULL, - PRIMARY KEY (entryid) -); - /* * Project tables */ @@ -132,8 +126,6 @@ CREATE TABLE task_offer ( insert into users values (NULL, "admin", "password", "Admin Modsen", "ntnu", "12345678", "street", "trondheim", "trondheim", "1234", "norway"); -insert into guestbook values (NULL, "Hello World"); - insert into project_category values (NULL, "Test"); insert into teams values (0, "NO TEAM", FALSE); From 1220a4b2ee5567d59bd93070c25442de01f5130b Mon Sep 17 00:00:00 2001 From: jakobsn Date: Tue, 12 Nov 2019 12:21:23 +0100 Subject: [PATCH 2/2] ... --- mysql/sql/init.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/sql/init.sql b/mysql/sql/init.sql index cdadd43..281ec6f 100644 --- a/mysql/sql/init.sql +++ b/mysql/sql/init.sql @@ -109,7 +109,7 @@ CREATE TABLE delivery ( ); CREATE TABLE task_offer ( - offerid INT UNSIGNED AUTO_INCREMENT,1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`db`.`tasks`, CONSTRAINT `tasks_ibfk_1` FOREIGN KEY (`teamid`) REFERENCES `teams` (`teamid`)) + offerid INT UNSIGNED AUTO_INCREMENT, taskid INT UNSIGNED NOT NULL, title VARCHAR(200) NOT NULL, price INT,