- Timestamp:
- 04/19/11 18:58:53 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HeuristicLabServicesHiveDataAccessPlugin.cs.frame
r5043 r6033 8 8 [Plugin("HeuristicLab.Services.Hive.DataAccess", "3.4.0.$WCREV$")] 9 9 [PluginFile("HeuristicLab.Services.Hive.DataAccess-3.4.dll", PluginFileType.Assembly)] 10 [PluginDependency("HeuristicLab.Clients.Common", "3.3")] 10 11 [PluginDependency("HeuristicLab.Common", "3.3")] 11 12 [PluginDependency("HeuristicLab.Core", "3.3")] 12 13 [PluginDependency("HeuristicLab.Persistence", "3.3")] 14 [PluginDependency("HeuristicLab.Services.Hive.Common", "3.4")] 13 15 public class HeuristicLabServicesHiveDataAccessPlugin : PluginBase { 14 16 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Tools/prepareHiveDatabase.sql
r6006 r6033 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 CASCADE61 --ON DELETE CASCADE62 --GO63 64 57 ALTER TABLE dbo.Plugin ALTER COLUMN PluginId ADD ROWGUIDCOL; 65 58 ALTER TABLE dbo.Plugin WITH NOCHECK ADD CONSTRAINT [DF_Plugin_PluginId] DEFAULT (newid()) FOR PluginId; … … 67 60 ALTER TABLE dbo.PluginData ALTER COLUMN PluginDataId ADD ROWGUIDCOL; 68 61 ALTER TABLE dbo.PluginData WITH NOCHECK ADD CONSTRAINT [DF_PluginData_PluginDataId] DEFAULT (newid()) FOR PluginDataId; 62 63 ALTER TABLE [dbo].[PluginData] DROP CONSTRAINT [Plugin_PluginData] 64 ALTER TABLE [dbo].[PluginData] WITH CHECK ADD CONSTRAINT [Plugin_PluginData] FOREIGN KEY([PluginId]) 65 REFERENCES [dbo].[Plugin] ([PluginId]) 66 ON UPDATE CASCADE 67 ON DELETE CASCADE 68 GO 69 69 70 70 ALTER TABLE dbo.RequiredPlugins ALTER COLUMN RequiredPluginId ADD ROWGUIDCOL; … … 108 108 109 109 /* triggers */ 110 USE [HeuristicLab.Hive-3.4] 111 GO 112 /****** Object: Trigger [dbo].[tr_HiveExperimentDeleteCascade] Script Date: 04/19/2011 16:31:53 ******/ 110 113 SET ANSI_NULLS ON 111 114 GO … … 114 117 -- ============================================= 115 118 -- Author: cneumuel 116 -- Create date: 1 1.04.2011119 -- Create date: 19.04.2011 117 120 -- Description: Deletes all associated jobs. This cannot be done with cascading delete, 118 121 -- because the job table defines a INSTEAD OF DELETE trigger itself, which 119 122 -- is not compatible with cascading deletes. 120 123 -- ============================================= 121 ALTERTRIGGER [dbo].[tr_HiveExperimentDeleteCascade] ON [dbo].[HiveExperiment] INSTEAD OF DELETE AS124 CREATE TRIGGER [dbo].[tr_HiveExperimentDeleteCascade] ON [dbo].[HiveExperiment] INSTEAD OF DELETE AS 122 125 BEGIN 123 DELETE Job FROM Job WHERE Job.HiveExperimentId = HiveExperimentId 126 DELETE Job FROM deleted, Job WHERE deleted.HiveExperimentId = Job.HiveExperimentId 127 DELETE HiveExperiment FROM deleted, HiveExperiment WHERE deleted.HiveExperimentId = HiveExperiment.HiveExperimentId 124 128 END 129 GO 125 130 126 SET ANSI_NULLS ON127 GO128 SET QUOTED_IDENTIFIER ON129 GO130 131 -- ============================================= 131 132 -- Author: cneumuel
Note: See TracChangeset
for help on using the changeset viewer.