forward porting 14363 and 14364: do not use NEW in an ON DELETE trigger, use OLD
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Oct 2009 16:20:20 +0000 (16:20 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Oct 2009 16:20:20 +0000 (16:20 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6_0@14365 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/080.schema.money.sql
Open-ILS/src/sql/Pg/1.4.0.5-1.6.0.0-upgrade-db.sql

index 8082c41..5b46f9c 100644 (file)
@@ -370,7 +370,7 @@ BEGIN
                  SET   last_billing_ts = prev_billing.billing_ts,
                        last_billing_note = prev_billing.note,
                        last_billing_type = prev_billing.billing_type
-                 WHERE id = NEW.xact;
+                 WHERE id = OLD.xact;
        END IF;
 
        IF NOT OLD.voided THEN
index 6de1355..9cefa0d 100644 (file)
@@ -941,7 +941,7 @@ BEGIN
                  SET   last_billing_ts = prev_billing.billing_ts,
                        last_billing_note = prev_billing.note,
                        last_billing_type = prev_billing.billing_type
-                 WHERE id = NEW.xact;
+                 WHERE id = OLD.xact;
        END IF;
 
        IF NOT OLD.voided THEN