From 15db230d7da157a0378b2d52ed4c782158d53615 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Sun, 24 Sep 2006 22:09:11 +0000 Subject: 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 --- sql/Pg-upgrade-2.6.18-2.6.19.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sql') 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); -- cgit v1.2.3