Skip to content

Commit

Permalink
schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ridz1208 committed May 23, 2019
1 parent fde6d46 commit 97e17a9
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions SQL/0000-00-00-schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,14 @@ INSERT INTO subproject (title, useEDC, WindowDifference) VALUES
('Control', false, 'optimal'),
('Experimental', false, 'optimal');

<<<<<<< HEAD
CREATE TABLE `project_rel` (
`ProjectSubprojectRelID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ProjectID` int(2) NOT NULL,
`SubprojectID` int(2) NOT NULL,
PRIMARY KEY (`ProjectSubprojectRelID`),
CONSTRAINT UK_project_subproject_rel_ProjectID_SubprojectID UNIQUE KEY (ProjectID, SubprojectID)
=======
CREATE TABLE `project_subproject_rel` (
`ProjectSubprojectID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ProjectSubprojectRelID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ProjectID` int(2) NOT NULL,
`SubprojectID` int(2) NOT NULL,
PRIMARY KEY (`ProjectSubprojectID`),
CONSTRAINT `UK_project_subproject_rel_ProjectID_SubprojectID` UNIQUE KEY (ProjectID, SubprojectID),
CONSTRAINT `FK_project_subproject_rel_ProjectID` FOREIGN KEY (`ProjectID`) REFERENCES `Project` (`ProjectID`) ON DELETE CASCADE,
CONSTRAINT `FK_project_subproject_rel_SubprojectID` FOREIGN KEY (`SubprojectID`) REFERENCES `subproject` (`SubprojectID`) ON DELETE CASCADE
>>>>>>> 06f7e3c... [SQL] Rename project_rel table and add constraints
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `psc` (
Expand Down Expand Up @@ -1991,7 +1982,7 @@ CREATE TABLE `visit_project_subproject_rel` (
CONSTRAINT FK_visit_project_subproject_rel_VisitID FOREIGN KEY (`VisitID`)
REFERENCES `visit`(`VisitID`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT FK_visit_project_subproject_rel_ProjectSubprojectRelID FOREIGN KEY (`ProjectSubprojectRelID`)
REFERENCES `project_rel`(`ProjectSubprojectRelID`) ON DELETE CASCADE ON UPDATE CASCADE
REFERENCES `project_subproject_rel`(`ProjectSubprojectRelID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Publication Status
Expand Down

0 comments on commit 97e17a9

Please sign in to comment.