Changeset 15659 for branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts
- Timestamp:
- 01/26/18 15:12:14 (7 years ago)
- Location:
- branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql
r15630 r15659 30 30 [ProjectId] UniqueIdentifier NOT NULL, 31 31 CONSTRAINT [PK_dbo.ResourceIdProjectId] PRIMARY KEY ([ResourceId], [ProjectId]) 32 )33 CREATE TABLE [dbo].[AssignedTaskResource](34 [ResourceId] UniqueIdentifier NOT NULL,35 [TaskId] UniqueIdentifier NOT NULL,36 CONSTRAINT [PK_dbo.ResourceIdTaskId] PRIMARY KEY ([ResourceId], [TaskId])37 32 ) 38 33 CREATE TABLE [dbo].[AssignedJobResource]( … … 176 171 ALTER TABLE [dbo].[AssignedProjectResource] 177 172 ADD CONSTRAINT [Project_AssignedProjectResource] FOREIGN KEY ([ProjectId]) REFERENCES [dbo].[Project]([ProjectId]) ON UPDATE CASCADE ON DELETE CASCADE; 178 ALTER TABLE [dbo].[AssignedTaskResource]179 ADD CONSTRAINT [Resource_AssignedTaskResource] FOREIGN KEY ([ResourceId]) REFERENCES [dbo].[Resource]([ResourceId]) ON UPDATE CASCADE ON DELETE CASCADE;180 ALTER TABLE [dbo].[AssignedTaskResource]181 ADD CONSTRAINT [Task_AssignedTaskResource] FOREIGN KEY ([TaskId]) REFERENCES [dbo].[Task]([TaskId]) ON UPDATE CASCADE ON DELETE CASCADE;182 173 ALTER TABLE [dbo].[AssignedJobResource] 183 174 ADD CONSTRAINT [Resource_AssignedJobResource] FOREIGN KEY ([ResourceId]) REFERENCES [dbo].[Resource]([ResourceId]) ON UPDATE CASCADE ON DELETE CASCADE; -
branches/HiveProjectManagement/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Prepare Hive Database.sql
r15630 r15659 33 33 ON DELETE CASCADE 34 34 GO 35 -- OBSOLETE (start)36 ALTER TABLE [dbo].[AssignedTaskResource] DROP CONSTRAINT [Task_AssignedTaskResource]37 ALTER TABLE [dbo].[AssignedTaskResource] WITH CHECK ADD CONSTRAINT [Task_AssignedTaskResource] FOREIGN KEY([TaskId])38 REFERENCES [dbo].[Task] ([TaskId])39 ON UPDATE CASCADE40 ON DELETE CASCADE41 GO42 ALTER TABLE [dbo].[AssignedTaskResource] DROP CONSTRAINT [Resource_AssignedTaskResource]43 ALTER TABLE [dbo].[AssignedTaskResource] WITH CHECK ADD CONSTRAINT [Resource_AssignedTaskResource] FOREIGN KEY([ResourceId])44 REFERENCES [dbo].[Resource] ([ResourceId])45 ON UPDATE CASCADE46 ON DELETE CASCADE47 GO48 -- OBSOLETE (end)49 35 ALTER TABLE [dbo].[AssignedJobResource] DROP CONSTRAINT [Job_AssignedJobResource] 50 36 ALTER TABLE [dbo].[AssignedJobResource] WITH CHECK ADD CONSTRAINT [Job_AssignedJobResource] FOREIGN KEY([JobId]) … … 118 104 REFERENCES [dbo].[Project] ([ProjectId]) 119 105 ON UPDATE CASCADE 120 -- ON DELETE CASCADE (no "ON DELETE CASCADE" >>> if project is deleted, jobs (actually job-belonging tasks) should be aborted, but not deleted 106 ON DELETE CASCADE 121 107 GO 122 108
Note: See TracChangeset
for help on using the changeset viewer.