diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-08 20:31:42 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-08 20:31:42 +0000 |
commit | 7376ef357ac4dce6bf30548c773774dddd2ea033 (patch) | |
tree | ab86ae48ff522b23483dcabc729d488191c46b3a /sql | |
parent | d64dfcdab846e8e592c26b98c804ff3bfbe11090 (diff) |
Fix syntax and table names to match schema
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@194 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql')
-rw-r--r-- | sql/Pg-upgrade-2.6.18-2.6.19.sql | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/Pg-upgrade-2.6.18-2.6.19.sql b/sql/Pg-upgrade-2.6.18-2.6.19.sql index 1c3493be..07541bde 100644 --- a/sql/Pg-upgrade-2.6.18-2.6.19.sql +++ b/sql/Pg-upgrade-2.6.18-2.6.19.sql @@ -1,4 +1,4 @@ -ALTER TABLE acc_trans ADD FOREIGN KEY trans_id REFERENCES transactions (id); +ALTER TABLE acc_trans ADD FOREIGN KEY (trans_id) REFERENCES transactions (id); ALTER TABLE ap ADD PRIMARY KEY (id); @@ -65,7 +65,7 @@ ALTER TABLE translation ADD PRIMARY KEY (trans_id, language_code); ALTER TABLE vendor ADD PRIMARY KEY (id); -ALTER TABLE vendor_tax ADD PRIMARY KEY (vendor_id, chart_id); +ALTER TABLE vendortax ADD PRIMARY KEY (vendor_id, chart_id); ALTER TABLE warehouse ADD PRIMARY KEY (id); @@ -101,15 +101,15 @@ SET DEFAULT nextval('partsvendor_entry_id_seq'); UPDATE partsvendor SET entry_id = nextval('partsvendor_entry_id_seq'); ALTER TABLE partsvendor ADD PRIMARY KEY (entry_id); -LOCK audit_trail IN EXCLUSIVE MODE; -ALTER TABLE audit_trail ADD COLUMN entry_id int; -CREATE SEQUENCE audit_trail_entry_id_seq ; +LOCK audittrail IN EXCLUSIVE MODE; +ALTER TABLE audittrail ADD COLUMN entry_id int; +CREATE SEQUENCE audittrail_entry_id_seq ; -ALTER TABLE audit_trail ALTER COLUMN entry_id -SET DEFAULT nextval('audit_trail_entry_id_seq'); +ALTER TABLE audittrail ALTER COLUMN entry_id +SET DEFAULT nextval('audittrail_entry_id_seq'); -UPDATE audit_trail SET entry_id = nextval('audit_trail_entry_id_seq'); -ALTER TABLE audit_trail ADD PRIMARY KEY (entry_id); +UPDATE audittrail SET entry_id = nextval('audittrail_entry_id_seq'); +ALTER TABLE audittrail ADD PRIMARY KEY (entry_id); LOCK shipto IN EXCLUSIVE MODE; ALTER TABLE shipto ADD COLUMN entry_id int; |