diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-09-24 22:09:11 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-09-24 22:09:11 +0000 |
commit | 15db230d7da157a0378b2d52ed4c782158d53615 (patch) | |
tree | e814912aa66baeb899573944f5571397042bdf05 /sql | |
parent | f54d096cea49a2420fd8f5d3a265df62b7b34047 (diff) |
correcting omission of primary key for shipto updating in anticipation of
multiple shipto support
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@144 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql')
-rw-r--r-- | sql/Pg-upgrade-2.6.18-2.6.19.sql | 10 |
1 files changed, 10 insertions, 0 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 5e338280..1c3493be 100644 --- a/sql/Pg-upgrade-2.6.18-2.6.19.sql +++ b/sql/Pg-upgrade-2.6.18-2.6.19.sql @@ -110,3 +110,13 @@ SET DEFAULT nextval('audit_trail_entry_id_seq'); UPDATE audit_trail SET entry_id = nextval('audit_trail_entry_id_seq'); ALTER TABLE audit_trail ADD PRIMARY KEY (entry_id); + +LOCK shipto IN EXCLUSIVE MODE; +ALTER TABLE shipto ADD COLUMN entry_id int; +CREATE SEQUENCE shipto_entry_id_seq ; + +ALTER TABLE shipto ALTER COLUMN entry_id +SET DEFAULT nextval('shipto_entry_id_seq'); + +UPDATE shipto SET entry_id = nextval('shipto_entry_id_seq'); +ALTER TABLE shipto ADD PRIMARY KEY (entry_id); |