mirror of
https://github.com/grocy/grocy.git
synced 2026-04-09 05:56:15 +02:00
Fixes #881. Remove items of deleted shopping lists.
This commit is contained in:
parent
fc860129ca
commit
e38d17471e
10
migrations/0108.sql
Normal file
10
migrations/0108.sql
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
DELETE
|
||||||
|
FROM shopping_list
|
||||||
|
WHERE shopping_list_id NOT IN (SELECT id FROM shopping_lists);
|
||||||
|
|
||||||
|
CREATE TRIGGER remove_items_from_deleted_shopping_list
|
||||||
|
AFTER DELETE
|
||||||
|
ON shopping_lists
|
||||||
|
BEGIN
|
||||||
|
DELETE FROM shopping_list WHERE shopping_list_id = OLD.id;
|
||||||
|
END;
|
||||||
Loading…
Reference in New Issue
Block a user