Don't use double quoted string literals (in triggers / RAISE)

This commit is contained in:
Bernd Bestel
2025-08-03 23:14:33 +02:00
parent 6b18b0a7be
commit ba2cb6ce08
14 changed files with 223 additions and 22 deletions

View File

@@ -48,7 +48,7 @@ BEGIN
FROM stock_log
WHERE product_id = NEW.id
AND NEW.qu_id_stock != OLD.qu_id_stock
) NOTNULL) THEN RAISE(ABORT, "qu_id_stock cannot be changed when the product was once added to stock") END;
) NOTNULL) THEN RAISE(ABORT, 'qu_id_stock cannot be changed when the product was once added to stock') END;
END;
CREATE TRIGGER enforce_parent_product_id_null_when_empty_INS AFTER INSERT ON products
@@ -104,7 +104,7 @@ BEGIN
FROM products p
WHERE IFNULL(NEW.parent_product_id, '') != ''
AND IFNULL(parent_product_id, '') = NEW.id
) NOTNULL) THEN RAISE(ABORT, "Unsupported product nesting level detected (currently only 1 level is supported)") END;
) NOTNULL) THEN RAISE(ABORT, 'Unsupported product nesting level detected (currently only 1 level is supported)') END;
END;
CREATE TRIGGER enforce_min_stock_amount_for_cumulated_childs_INS AFTER INSERT ON products