Stamping upgrade for LP#928896
authorBill Erickson <berick@esilibrary.com>
Wed, 8 Feb 2012 15:32:44 +0000 (10:32 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 8 Feb 2012 15:32:44 +0000 (10:32 -0500)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0675.schema.usr_visible_circ_copies_row_estimates.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.usr_visible_circ_copies_row_estimates.sql [deleted file]

index 9914d60..f596fa2 100644 (file)
@@ -86,7 +86,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 ('0674', :eg_version); -- phasefx/Dyrcona/senator
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0675', :eg_version); -- gmc/berick
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0675.schema.usr_visible_circ_copies_row_estimates.sql b/Open-ILS/src/sql/Pg/upgrade/0675.schema.usr_visible_circ_copies_row_estimates.sql
new file mode 100644 (file)
index 0000000..0c7c8e3
--- /dev/null
@@ -0,0 +1,12 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0675', :eg_version);
+
+-- set expected row count to low value to avoid problem
+-- where use of this function by the circ tagging feature
+-- results in full scans of asset.call_number
+CREATE OR REPLACE FUNCTION action.usr_visible_circ_copies( INTEGER ) RETURNS SETOF BIGINT AS $$
+    SELECT DISTINCT(target_copy) FROM action.usr_visible_circs($1)
+$$ LANGUAGE SQL ROWS 10;
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.usr_visible_circ_copies_row_estimates.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.usr_visible_circ_copies_row_estimates.sql
deleted file mode 100644 (file)
index a191fb4..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-BEGIN;
-
--- set expected row count to low value to avoid problem
--- where use of this function by the circ tagging feature
--- results in full scans of asset.call_number
-CREATE OR REPLACE FUNCTION action.usr_visible_circ_copies( INTEGER ) RETURNS SETOF BIGINT AS $$
-    SELECT DISTINCT(target_copy) FROM action.usr_visible_circs($1)
-$$ LANGUAGE SQL ROWS 10;
-
-COMMIT;