Changeset 6006 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Tools/prepareHiveDatabase.sql
- Timestamp:
- 04/12/11 13:43:05 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources
- Property svn:ignore
-
old new 4 4 PrecompiledWeb 5 5 CreateEventLogSources 6 WindowsFormsTestProject
-
- Property svn:ignore
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Tools/prepareHiveDatabase.sql
r5955 r6006 55 55 GO 56 56 57 --ALTER TABLE [dbo].[Job] DROP CONSTRAINT [HiveExperiment_Job] 58 --ALTER TABLE [dbo].[Job] WITH CHECK ADD CONSTRAINT [HiveExperiment_Job] FOREIGN KEY([HiveExperimentId]) 59 --REFERENCES [dbo].[HiveExperiment] ([HiveExperimentId]) 60 --ON UPDATE CASCADE 61 --ON DELETE CASCADE 62 --GO 63 57 64 ALTER TABLE dbo.Plugin ALTER COLUMN PluginId ADD ROWGUIDCOL; 58 65 ALTER TABLE dbo.Plugin WITH NOCHECK ADD CONSTRAINT [DF_Plugin_PluginId] DEFAULT (newid()) FOR PluginId; … … 107 114 -- ============================================= 108 115 -- Author: cneumuel 109 -- Create date: 11.11.2010 110 -- Description: Deletes the root-job of the experiment when experiment is deleted 116 -- Create date: 11.04.2011 117 -- Description: Deletes all associated jobs. This cannot be done with cascading delete, 118 -- because the job table defines a INSTEAD OF DELETE trigger itself, which 119 -- is not compatible with cascading deletes. 111 120 -- ============================================= 112 CREATE TRIGGER [dbo].[tr_HiveExperimentDeleteCascade] ON [dbo].[HiveExperiment] FORDELETE AS113 SET NOCOUNT ON114 DELETE Job FROM deleted, Job WHERE Job.JobId = deleted.RootJobId115 GO 121 ALTER TRIGGER [dbo].[tr_HiveExperimentDeleteCascade] ON [dbo].[HiveExperiment] INSTEAD OF DELETE AS 122 BEGIN 123 DELETE Job FROM Job WHERE Job.HiveExperimentId = HiveExperimentId 124 END 116 125 117 126 SET ANSI_NULLS ON
Note: See TracChangeset
for help on using the changeset viewer.