[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [144] trunk/sql/Pg-upgrade-2.6.18-2.6.19.sql
- Subject: SF.net SVN: ledger-smb: [144] trunk/sql/Pg-upgrade-2.6.18-2.6.19.sql
- From: ..hidden..
- Date: Sun, 24 Sep 2006 15:09:12 -0700
Revision: 144
http://svn.sourceforge.net/ledger-smb/?rev=144&view=rev
Author: einhverfr
Date: 2006-09-24 15:09:11 -0700 (Sun, 24 Sep 2006)
Log Message:
-----------
correcting omission of primary key for shipto updating in anticipation of
multiple shipto support
Modified Paths:
--------------
trunk/sql/Pg-upgrade-2.6.18-2.6.19.sql
Modified: trunk/sql/Pg-upgrade-2.6.18-2.6.19.sql
===================================================================
--- trunk/sql/Pg-upgrade-2.6.18-2.6.19.sql 2006-09-24 21:58:19 UTC (rev 143)
+++ trunk/sql/Pg-upgrade-2.6.18-2.6.19.sql 2006-09-24 22:09:11 UTC (rev 144)
@@ -110,3 +110,13 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.