     DROP TRIGGER trigger_workflow_delete;
 GO
 
-CREATE TRIGGER trigger_workflow_delete
+exec('CREATE TRIGGER trigger_workflow_delete
 ON workflow
 INSTEAD OF DELETE
 AS

  host_id BIGINT NULL,      -- unlike most host_id columns, this one allows NULLs because the request can be at the service level
  PRIMARY KEY CLUSTERED (operation_level_id)
  );

CREATE TABLE ClusterHostMapping (
  cluster_id BIGINT NOT NULL,
  host_id BIGINT NOT NULL,

    DROP TRIGGER trigger_task_delete;
GO

exec('CREATE TRIGGER trigger_task_delete
ON task
INSTEAD OF DELETE
AS
