Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/RB-50-quick-fix' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
gavronek committed Jan 29, 2015
2 parents 04a8839 + 933d8e5 commit c2d0b69
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 18 deletions.
13 changes: 12 additions & 1 deletion etc/ReqBaz_create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,17 @@ 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 Requirements RENAME TO requirements;
ALTER TABLE Tags RENAME TO tags;
ALTER TABLE Users RENAME TO users;
ALTER TABLE Votes RENAME TO votes;

-- End of file.
34 changes: 17 additions & 17 deletions etc/ReqBaz_demo_data.sql
Original file line number Diff line number Diff line change
@@ -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', '[email protected]', '1', '1', 'MaxMustermann1'),
Expand Down Expand Up @@ -42,7 +42,7 @@ INSERT INTO `reqbaz`.`Users`
('39','Max39', 'Mustermann39', '[email protected]', '0', '39', 'MaxMustermann39'),
('40','Max40', 'Mustermann40', '[email protected]', '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),
Expand All @@ -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'),
Expand Down Expand Up @@ -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'),
Expand Down Expand Up @@ -162,7 +162,7 @@ VALUES



INSERT INTO `reqbaz`.`Followers`
INSERT INTO `reqbaz`.`followers`
(`Id`, `Requirement_Id`, `User_Id`)
VALUES
('1', '1', '1'),
Expand All @@ -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'),
Expand All @@ -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'),
Expand Down

0 comments on commit c2d0b69

Please sign in to comment.