Modifying a standalone note would remove it from any collections it was in (since 2.0b7.5)
This commit is contained in:
parent
6bed1231b3
commit
351d904dbe
|
@ -1,4 +1,4 @@
|
|||
-- 13
|
||||
-- 14
|
||||
|
||||
-- Triggers to validate date field
|
||||
DROP TRIGGER IF EXISTS insert_date_field;
|
||||
|
@ -283,7 +283,7 @@ CREATE TRIGGER fku_itemAttachments_sourceItemID_collectionItems_itemID
|
|||
DROP TRIGGER IF EXISTS fku_itemNotes_sourceItemID_collectionItems_itemID;
|
||||
CREATE TRIGGER fku_itemNotes_sourceItemID_collectionItems_itemID
|
||||
BEFORE UPDATE OF sourceItemID ON itemNotes
|
||||
FOR EACH ROW BEGIN
|
||||
FOR EACH ROW WHEN OLD.sourceItemID IS NULL AND NEW.sourceItemID IS NOT NULL BEGIN
|
||||
DELETE FROM collectionItems WHERE itemID = NEW.itemID;
|
||||
END;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user