diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-12-11 05:47:39 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-12-11 05:47:39 +0000 |
commit | e7cbaf0e5a8bbdd82fc8ff967c1f1eeaca721574 (patch) | |
tree | a1d9f2049c3a7e014dbdb8e82152afc459232e36 | |
parent | dadb54b1ae14af43eca02a487dc21bfbe20c1227 (diff) |
Minor db fixes
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1972 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | sql/Pg-database.sql | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql index 2b82eb8e..708ca081 100644 --- a/sql/Pg-database.sql +++ b/sql/Pg-database.sql @@ -426,7 +426,7 @@ CREATE TABLE entity_credit_account ( startdate date DEFAULT CURRENT_DATE, enddate date, threshold numeric default 0, - employee_id int references employee_entity(employee_id), + employee_id int references entity_employee(employee_id), primary_contact int references person(id), PRIMARY KEY(entity_id, meta_number) ); @@ -1032,19 +1032,19 @@ BEGIN UPDATE transactions SET id = new.id WHERE id = old.id; END IF; ELSE - DELETE FROM transactions WHERE id = old_id; + DELETE FROM transactions WHERE id = old.id; END IF; RETURN new; END; $$ LANGUAGE PLPGSQL; -CREATE TRIGGER ap_track_global_sequence before insert or update or delete on ap +CREATE TRIGGER ap_track_global_sequence before insert or update on ap for each row execute procedure track_global_sequence(); -CREATE TRIGGER ar_track_global_sequence before insert or update or delete on ar +CREATE TRIGGER ar_track_global_sequence before insert or update on ar for each row execute procedure track_global_sequence(); -CREATE TRIGGER gl_track_global_sequence before insert or update or delete on gl +CREATE TRIGGER gl_track_global_sequence before insert or update on gl for each row execute procedure track_global_sequence(); CREATE TABLE custom_table_catalog ( |