From 7016af3907f07404b08e53b5ea49e01a797f7077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Koren?= Date: Mon, 26 Jan 2015 20:25:57 +0100 Subject: [PATCH 1/3] Quick fix for RB-50 --- etc/ReqBaz_create.sql | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/etc/ReqBaz_create.sql b/etc/ReqBaz_create.sql index 70e34f48..c7884747 100644 --- a/etc/ReqBaz_create.sql +++ b/etc/ReqBaz_create.sql @@ -238,6 +238,16 @@ ALTER TABLE Votes ADD CONSTRAINT Votes_Requirement FOREIGN KEY Votes_Requirement ALTER TABLE Votes ADD CONSTRAINT Votes_User FOREIGN KEY Votes_User (User_Id) REFERENCES Users (Id); - +-- Quick fix for RB-50 +ALTER TABLE Attachments RENAME TO attachments; +ALTER TABLE Authorizations RENAME TO authorizations; +ALTER TABLE Comments RENAME TO comments; +ALTER TABLE Components RENAME TO components; +ALTER TABLE Developers RENAME TO developers; +ALTER TABLE Followers RENAME TO followers; +ALTER TABLE Projects RENAME TO projects; +ALTER TABLE Tags RENAME TO tags; +ALTER TABLE Users RENAME TO users; +ALTER TABLE Votes RENAME TO votes; -- End of file. From 415e7d6864a7e29913e64c06ff6c81c7b0b04538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Koren?= Date: Mon, 26 Jan 2015 20:27:47 +0100 Subject: [PATCH 2/3] Quick fix for RB-50 --- etc/ReqBaz_demo_data.sql | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/etc/ReqBaz_demo_data.sql b/etc/ReqBaz_demo_data.sql index 8eb293fd..c80e0f09 100644 --- a/etc/ReqBaz_demo_data.sql +++ b/etc/ReqBaz_demo_data.sql @@ -1,4 +1,4 @@ -INSERT INTO `reqbaz`.`Users` +INSERT INTO `reqbaz`.`users` (`Id`,`first_name`, `last_name`, `email`, `admin`, `Las2peer_Id`, `user_name`) VALUES ('1','Max1', 'Mustermann1', 'Max@Mustermann1.de', '1', '1', 'MaxMustermann1'), @@ -42,7 +42,7 @@ INSERT INTO `reqbaz`.`Users` ('39','Max39', 'Mustermann39', 'Max@Mustermann39.de', '0', '39', 'MaxMustermann39'), ('40','Max40', 'Mustermann40', 'Max@Mustermann40.de', '0', '40', 'MaxMustermann40'); -INSERT INTO `reqbaz`.`Projects` +INSERT INTO `reqbaz`.`projects` (`Id`,`name`, `description`, `visibility`, `Leader_Id`, `Default_Components_Id`) VALUES ('1','Project 1', 'Project 1 - Description - This project is visible - leader MaxMustermann1', '+', '1',NULL), @@ -58,7 +58,7 @@ VALUES -INSERT INTO `reqbaz`.`Components` +INSERT INTO `reqbaz`.`components` (`Id`,`name`, `description`, `Project_Id`, `Leader_Id`) VALUES ('1','Component 1', 'Component - Description', '1', '1'), @@ -102,20 +102,20 @@ VALUES ('39','Uncategorized-P9 ', 'Uncategorized requirements for Project 9 ', '9 ', '7'), ('40','Uncategorized-P10', 'Uncategorized requirements for Project 10', '10', '8'); -UPDATE `reqbaz`.`Projects` SET `Default_Components_Id`='31' WHERE `Id`='1 '; -UPDATE `reqbaz`.`Projects` SET `Default_Components_Id`='32' WHERE `Id`='2 '; -UPDATE `reqbaz`.`Projects` SET `Default_Components_Id`='33' WHERE `Id`='3 '; -UPDATE `reqbaz`.`Projects` SET `Default_Components_Id`='34' WHERE `Id`='4 '; -UPDATE `reqbaz`.`Projects` SET `Default_Components_Id`='35' WHERE `Id`='5 '; -UPDATE `reqbaz`.`Projects` SET `Default_Components_Id`='36' WHERE `Id`='6 '; -UPDATE `reqbaz`.`Projects` SET `Default_Components_Id`='37' WHERE `Id`='7 '; -UPDATE `reqbaz`.`Projects` SET `Default_Components_Id`='38' WHERE `Id`='8 '; -UPDATE `reqbaz`.`Projects` SET `Default_Components_Id`='39' WHERE `Id`='9 '; -UPDATE `reqbaz`.`Projects` SET `Default_Components_Id`='40' WHERE `Id`='10'; +UPDATE `reqbaz`.`projects` SET `Default_Components_Id`='31' WHERE `Id`='1 '; +UPDATE `reqbaz`.`projects` SET `Default_Components_Id`='32' WHERE `Id`='2 '; +UPDATE `reqbaz`.`projects` SET `Default_Components_Id`='33' WHERE `Id`='3 '; +UPDATE `reqbaz`.`projects` SET `Default_Components_Id`='34' WHERE `Id`='4 '; +UPDATE `reqbaz`.`projects` SET `Default_Components_Id`='35' WHERE `Id`='5 '; +UPDATE `reqbaz`.`projects` SET `Default_Components_Id`='36' WHERE `Id`='6 '; +UPDATE `reqbaz`.`projects` SET `Default_Components_Id`='37' WHERE `Id`='7 '; +UPDATE `reqbaz`.`projects` SET `Default_Components_Id`='38' WHERE `Id`='8 '; +UPDATE `reqbaz`.`projects` SET `Default_Components_Id`='39' WHERE `Id`='9 '; +UPDATE `reqbaz`.`projects` SET `Default_Components_Id`='40' WHERE `Id`='10'; -INSERT INTO `reqbaz`.`Requirements` +INSERT INTO `reqbaz`.`requirements` (`Id`, `title`, `description`, `Lead_developer_Id`, `Creator_Id`, `Project_Id`) VALUES ('1', 'Requirement ', 'Requirement - Description', '1', '1', '1'), @@ -162,7 +162,7 @@ VALUES -INSERT INTO `reqbaz`.`Followers` +INSERT INTO `reqbaz`.`followers` (`Id`, `Requirement_Id`, `User_Id`) VALUES ('1', '1', '1'), @@ -187,7 +187,7 @@ VALUES ('20', '2', '1'); -INSERT INTO `reqbaz`.`Developers` +INSERT INTO `reqbaz`.`developers` (`Id`, `Requirement_Id`, `User_Id`) VALUES ('1', '1', '1'), @@ -212,7 +212,7 @@ VALUES ('20', '6', '12'); -INSERT INTO `reqbaz`.`Tags` +INSERT INTO `reqbaz`.`tags` (`Id`, `Components_Id`, `Requirements_Id`) VALUES ('1', '1', '1'), From 933d8e51a018f017d86f1c30554945130c1fa6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Koren?= Date: Mon, 26 Jan 2015 20:41:44 +0100 Subject: [PATCH 3/3] Requirements table was missing from rename. --- etc/ReqBaz_create.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/ReqBaz_create.sql b/etc/ReqBaz_create.sql index c7884747..577b8594 100644 --- a/etc/ReqBaz_create.sql +++ b/etc/ReqBaz_create.sql @@ -246,6 +246,7 @@ ALTER TABLE Components RENAME TO components; ALTER TABLE Developers RENAME TO developers; ALTER TABLE Followers RENAME TO followers; ALTER TABLE Projects RENAME TO projects; +ALTER TABLE Requirements RENAME TO requirements; ALTER TABLE Tags RENAME TO tags; ALTER TABLE Users RENAME TO users; ALTER TABLE Votes RENAME TO votes;