push the asset.uri pkey serial into reality -- before 2.0 we did not use the serial
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 16 Nov 2010 16:50:31 +0000 (16:50 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 16 Nov 2010 16:50:31 +0000 (16:50 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18754 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql

index d43764b..bb6e0ba 100644 (file)
@@ -29,6 +29,9 @@ UPDATE biblio.record_entry SET marc = '<record xmlns="http://www.loc.gov/MARC21/
 
 INSERT INTO config.upgrade_log (version) VALUES ('0461');
 
+-- Push the auri serial in case it's out of date
+SELECT SETVAL('asset.uri'::TEXT, GREATEST((SELECT MAX(id) + 1 FROM asset.uri)));
+
 -- Remove some uses of the connectby() function from the tablefunc contrib module
 CREATE OR REPLACE FUNCTION actor.org_unit_descendants( INT, INT ) RETURNS SETOF actor.org_unit AS $$
     WITH RECURSIVE descendant_depth AS (