From 1e12757c6dbbb7a48923705437426fe24f86e10a Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Wed, 8 Feb 2017 17:48:28 +0500 Subject: - Replace fk_user_user_manageduserid in MS SQL with trigger - Drop defaultValue before add --- schema/changelog-3.10.xml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'schema') diff --git a/schema/changelog-3.10.xml b/schema/changelog-3.10.xml index c4d9b7b18..33f02880d 100644 --- a/schema/changelog-3.10.xml +++ b/schema/changelog-3.10.xml @@ -62,12 +62,12 @@ - devicelimit = 0 + @@ -75,4 +75,30 @@ + + + + + + + + + + + + + + + + + + CREATE TRIGGER tg_users_delete + ON users FOR DELETE + AS BEGIN + DELETE FROM user_user WHERE managedUserId IN (SELECT deleted.id FROM deleted) + END + + + + -- cgit v1.2.3