LP1287967 - drop reporter.classic_current_circ view as part of 0864 upgrade
authorBen Shum <bshum@biblio.org>
Thu, 6 Mar 2014 22:46:30 +0000 (17:46 -0500)
committerBen Shum <bshum@biblio.org>
Sun, 16 Mar 2014 19:29:19 +0000 (15:29 -0400)
As noted in the bug description, attempts to run 0864.MVF_CRA-upgrade.sql will
fail on a database where the reporter.classic_current_circ view is present.

Add a DROP VIEW IF EXISTS and then include a note that administrators will need
to recreate the VIEW afterwards if desired.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/sql/Pg/upgrade/0864.MVF_CRA-upgrade.sql

index 4adbde7..4307f90 100644 (file)
@@ -139,6 +139,7 @@ INSERT INTO metabib.record_attr_vector_list (source,vlist)
       WHERE COALESCE(u.id,c.id) IS NOT NULL
       GROUP BY 1;
 
+DROP VIEW IF EXISTS reporter.classic_current_circ; 
 DROP VIEW metabib.rec_descriptor;
 DROP TABLE metabib.record_attr;
 
@@ -898,3 +899,6 @@ CREATE OR REPLACE FUNCTION unapi.mra (
 $F$ LANGUAGE SQL STABLE;
 
 COMMIT;
+\qecho 'We dropped reporter.classic_current_circ earlier from the'
+\qecho 'example.reporter-extension.sql sample. You will need to'
+\qecho 'run it again to recreate that custom reporter view.'