diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-09-15 14:49:17 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-09-15 14:49:17 +0000 |
commit | be9f7146e9e9ecad28c8cdd569b2245913700fd8 (patch) | |
tree | a041e520e639d1c892624b0b9e753d7285208a2a | |
parent | 2e061bd137b2cb5782ad4dff1aec8a88be1b6a06 (diff) |
Added foreign key constraint to acc_trans
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@99 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | Changelog | 3 | ||||
-rw-r--r-- | sql/Pg-upgrade-2.6.17-2.6.18.sql | 4 |
2 files changed, 7 insertions, 0 deletions
@@ -6,11 +6,14 @@ Database * DB Updates now use one transaction per update file. * FLOAT datatypes removed from database * Protection against duplicate transaction id's. +* Added foreign key constraint to acc_trans.chart_id Security * One is required to change the admin password when it is blank (on first login etc). Usability +* Setup.pl use is now experimentally supported +* Disabled editing sub-assemblies in one area where it is unsafe. * Utility included for near-real-time parts short email notifications. * Fixed Lynx support * Batch printing now available for checks diff --git a/sql/Pg-upgrade-2.6.17-2.6.18.sql b/sql/Pg-upgrade-2.6.17-2.6.18.sql index 0ed4e0da..36f52a04 100644 --- a/sql/Pg-upgrade-2.6.17-2.6.18.sql +++ b/sql/Pg-upgrade-2.6.17-2.6.18.sql @@ -11,6 +11,9 @@ ALTER TABLE acc_trans ALTER COLUMN entry_id SET DEFAULT nextval('acctrans_entry_ UPDATE acc_trans SET entry_id = nextval('acctrans_entry_id_seq'); ALTER TABLE acc_trans ADD PRIMARY key (entry_id); +-- We should probably add a foreign key to chart.id +ALTER TABLE acc_trans ADD FOREIGN KEY (chart_id) REFERENCES chart (id); + -- Start changing floats ALTER TABLE acc_trans ALTER COLUMN amount TYPE numeric(10,2); @@ -220,5 +223,6 @@ DO ALSO INSERT INTO id_tracker (id, table_name) VALUES (new.id, 'employee'); CREATE RULE warehouse_id_track_u AS ON update TO warehouse DO ALSO UPDATE id_tracker SET id = new.id WHERE id = old.id; + COMMIT; |