Make it possible to merge products (closes #243)

This commit is contained in:
Bernd Bestel
2020-12-20 20:58:22 +01:00
parent dadf93a94c
commit c9b5e14473
9 changed files with 220 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
CREATE TRIGGER cascade_product_removal AFTER DELETE ON products
BEGIN
DELETE FROM stock
WHERE product_id = OLD.id;
DELETE FROM stock_log
WHERE product_id = OLD.id;