Stamping upgrade script for aoupa constraint fix
authorMike Rylander <mrylander@gmail.com>
Wed, 27 Mar 2013 19:50:40 +0000 (15:50 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 27 Mar 2013 19:50:40 +0000 (15:50 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0785.schema.aoupa-unique-constraint.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.aoupa-unique-constraint.sql [deleted file]

index 8d86600..07bb235 100644 (file)
@@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0784', :eg_version); -- Callender/berick
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0785', :eg_version); -- senator/miker
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0785.schema.aoupa-unique-constraint.sql b/Open-ILS/src/sql/Pg/upgrade/0785.schema.aoupa-unique-constraint.sql
new file mode 100644 (file)
index 0000000..37b15b8
--- /dev/null
@@ -0,0 +1,17 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0785', :eg_version);
+
+DROP INDEX actor.prox_adj_once_idx;
+
+CREATE UNIQUE INDEX prox_adj_once_idx ON actor.org_unit_proximity_adjustment (
+    COALESCE(item_circ_lib, -1),
+    COALESCE(item_owning_lib, -1),
+    COALESCE(copy_location, -1),
+    COALESCE(hold_pickup_lib, -1),
+    COALESCE(hold_request_lib, -1),
+    COALESCE(circ_mod, ''),
+    pos
+);
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.aoupa-unique-constraint.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.aoupa-unique-constraint.sql
deleted file mode 100644 (file)
index 1f5221d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-DROP INDEX actor.prox_adj_once_idx;
-
-CREATE UNIQUE INDEX prox_adj_once_idx ON actor.org_unit_proximity_adjustment (
-    COALESCE(item_circ_lib, -1),
-    COALESCE(item_owning_lib, -1),
-    COALESCE(copy_location, -1),
-    COALESCE(hold_pickup_lib, -1),
-    COALESCE(hold_request_lib, -1),
-    COALESCE(circ_mod, ''),
-    pos
-);
-
-COMMIT;