Allow delete of grid/content when deleted rousages and transitions exist. This was causing the code to crash.
This commit is contained in:
parent
2490413441
commit
6ae1fcda1a
@ -8965,7 +8965,7 @@ GO
|
|||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||||
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
|
Copyright 2016 - Volian Enterprises, Inc. All rights reserved.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
CREATE PROCEDURE [dbo].[DeleteItemAndChildren]
|
CREATE PROCEDURE [dbo].[DeleteItemAndChildren]
|
||||||
(
|
(
|
||||||
@ -9104,6 +9104,10 @@ BEGIN TRY -- Try Block
|
|||||||
Update Items set PreviousID = null where ItemID in (Select ItemID from @Children) and PreviousID Is Not Null
|
Update Items set PreviousID = null where ItemID in (Select ItemID from @Children) and PreviousID Is Not Null
|
||||||
-- Delete Item Records
|
-- Delete Item Records
|
||||||
DELETE from Items where ItemID in(Select ItemID from @Children)
|
DELETE from Items where ItemID in(Select ItemID from @Children)
|
||||||
|
-- Remove Previously deleted transitions
|
||||||
|
DELETE from tblTransitions where deletestatus = -1 and FromID in(SELECT ContentID FROM @Children)
|
||||||
|
-- Remove Previously deleted rousages
|
||||||
|
DELETE from tblrousages where deletestatus = -1 and contentID in(SELECT ContentID FROM @Children)
|
||||||
-- DELETE Contents
|
-- DELETE Contents
|
||||||
DELETE from Contents where ContentID in(Select ContentID from @Children)
|
DELETE from Contents where ContentID in(Select ContentID from @Children)
|
||||||
--purge deletelog
|
--purge deletelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user