[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [925] branches/1.2/sql/legacy/Pg-upgrade-2.6.18-2.6 .19.sql



Revision: 925
          http://svn.sourceforge.net/ledger-smb/?rev=925&view=rev
Author:   einhverfr
Date:     2007-03-16 21:48:59 -0700 (Fri, 16 Mar 2007)

Log Message:
-----------
Adding provisions in upgrade script for duplicate orderitems (id)'s.

Modified Paths:
--------------
    branches/1.2/sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql

Modified: branches/1.2/sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql
===================================================================
--- branches/1.2/sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql	2007-03-17 04:41:47 UTC (rev 924)
+++ branches/1.2/sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql	2007-03-17 04:48:59 UTC (rev 925)
@@ -34,6 +34,9 @@
 
 ALTER TABLE oe ADD PRIMARY KEY (id);
 
+SELECT setval('orderitemsid', 1);
+UPDATE orderitems SET id = nextval('orderitemsid');
+
 ALTER TABLE orderitems ADD PRIMARY KEY (id);
 
 ALTER TABLE parts ADD PRIMARY KEY (id);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.