From 3eb9d26150bd4b84e4bf7c640c6d314a64577839 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 22 Oct 2018 05:09:55 +0400 Subject: Move changeset to new changelog --- schema/changelog-4.0-clean.xml | 41 ------------------------------------ schema/changelog-4.1.xml | 47 ++++++++++++++++++++++++++++++++++++++++++ schema/changelog-master.xml | 2 ++ 3 files changed, 49 insertions(+), 41 deletions(-) create mode 100644 schema/changelog-4.1.xml (limited to 'schema') diff --git a/schema/changelog-4.0-clean.xml b/schema/changelog-4.0-clean.xml index 0bdcc41e5..f3f814eba 100644 --- a/schema/changelog-4.0-clean.xml +++ b/schema/changelog-4.0-clean.xml @@ -646,45 +646,4 @@ - - - - - - - - - - - IF EXISTS (SELECT * FROM sysobjects WHERE type = 'TR' AND name = 'tg_groups_delete') - BEGIN - DROP TRIGGER tg_groups_delete - END; - - - - CREATE TRIGGER tg_groups_delete - ON tc_groups FOR DELETE - AS BEGIN - UPDATE tc_groups SET groupid = NULL WHERE groupid IN (SELECT deleted.id FROM deleted) - END - - - - IF EXISTS (SELECT * FROM sysobjects WHERE type = 'TR' AND name = 'tg_users_delete') - BEGIN - DROP TRIGGER tg_users_delete - END; - - - - CREATE TRIGGER tg_users_delete - ON tc_users FOR DELETE - AS BEGIN - DELETE FROM tc_user_user WHERE manageduserid IN (SELECT deleted.id FROM deleted) - END - - - - diff --git a/schema/changelog-4.1.xml b/schema/changelog-4.1.xml new file mode 100644 index 000000000..3446fb9f1 --- /dev/null +++ b/schema/changelog-4.1.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + IF EXISTS (SELECT * FROM sysobjects WHERE type = 'TR' AND name = 'tg_groups_delete') + BEGIN + DROP TRIGGER tg_groups_delete + END; + + + + CREATE TRIGGER tg_groups_delete + ON tc_groups FOR DELETE + AS BEGIN + UPDATE tc_groups SET groupid = NULL WHERE groupid IN (SELECT deleted.id FROM deleted) + END + + + + IF EXISTS (SELECT * FROM sysobjects WHERE type = 'TR' AND name = 'tg_users_delete') + BEGIN + DROP TRIGGER tg_users_delete + END; + + + + CREATE TRIGGER tg_users_delete + ON tc_users FOR DELETE + AS BEGIN + DELETE FROM tc_user_user WHERE manageduserid IN (SELECT deleted.id FROM deleted) + END + + + + + diff --git a/schema/changelog-master.xml b/schema/changelog-master.xml index c14a2b4d4..f564c3d68 100644 --- a/schema/changelog-master.xml +++ b/schema/changelog-master.xml @@ -22,4 +22,6 @@ + + -- cgit v1.2.3