aboutsummaryrefslogtreecommitdiff
path: root/schema/changelog-4.0-clean.xml
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-10-11 09:56:12 +0500
committerAbyss777 <abyss@fox5.ru>2018-10-11 09:56:12 +0500
commitbf26c3aa265e3fcdd74b3daaac894f4c001013eb (patch)
tree1be84469993ccfee23432e7791700c2487798028 /schema/changelog-4.0-clean.xml
parent81db6816268e7355df8e4a2b9600b3ab1145d84d (diff)
downloadtrackermap-server-bf26c3aa265e3fcdd74b3daaac894f4c001013eb.tar.gz
trackermap-server-bf26c3aa265e3fcdd74b3daaac894f4c001013eb.tar.bz2
trackermap-server-bf26c3aa265e3fcdd74b3daaac894f4c001013eb.zip
Fix MSSQL triggers after renaming columns
Diffstat (limited to 'schema/changelog-4.0-clean.xml')
-rw-r--r--schema/changelog-4.0-clean.xml17
1 files changed, 14 insertions, 3 deletions
diff --git a/schema/changelog-4.0-clean.xml b/schema/changelog-4.0-clean.xml
index 0f3f694ba..27a845dc8 100644
--- a/schema/changelog-4.0-clean.xml
+++ b/schema/changelog-4.0-clean.xml
@@ -652,13 +652,17 @@
<changeSet author="author" id="changelog-4.0-clean-mssql">
<preConditions onFail="MARK_RAN">
- <not>
- <changeSetExecuted changeLogFile="changelog-3.3" id="changelog-3.3" author="author" />
- </not>
<dbms type="mssql" />
</preConditions>
<sql>
+ IF EXISTS (SELECT * FROM sysobjects WHERE type = 'TR' AND name = 'tg_groups_delete')
+ BEGIN
+ DROP TRIGGER tg_groups_delete
+ END;
+ </sql>
+
+ <sql>
CREATE TRIGGER tg_groups_delete
ON tc_groups FOR DELETE
AS BEGIN
@@ -667,6 +671,13 @@
</sql>
<sql>
+ IF EXISTS (SELECT * FROM sysobjects WHERE type = 'TR' AND name = 'tg_users_delete')
+ BEGIN
+ DROP TRIGGER tg_users_delete
+ END;
+ </sql>
+
+ <sql>
CREATE TRIGGER tg_users_delete
ON tc_users FOR DELETE
AS BEGIN