Move PLPERL dropping outside of 2.1-2.2 upgrade transaction
authorDan Scott <dan@coffeecode.net>
Fri, 11 May 2012 14:45:39 +0000 (10:45 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 11 May 2012 20:02:07 +0000 (16:02 -0400)
Sites might have added custom PLPERL database functions for migrations,
data clean up, etc, so don't make the success of the 2.1-2.2 upgrade
hinge on a database schema that exactly matches vanilla Evergreen;
just move it outside of the upgrade transaction and output a reassuring
note.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>

Open-ILS/src/sql/Pg/version-upgrade/2.1-2.2-upgrade-db.sql

index 5b369e7..59a59af 100644 (file)
@@ -11648,9 +11648,6 @@ CREATE OR REPLACE FUNCTION auditor.clear_audit_info() RETURNS VOID AS $$
     delete($_SHARED{"eg_audit_ws"});
 $$ LANGUAGE plperlu;
 
--- And remove the language so that we don't use it later.
-DROP LANGUAGE plperl;
-
 -- Evergreen DB patch 0697.data.place_currently_unfillable_hold.sql
 --
 -- FIXME: insert description of change, if needed
@@ -15656,7 +15653,7 @@ COMMIT;
 \qecho ************************************************************************
 \qecho The following transaction, wrapping upgrades 0679 and 0680, may take a
 \qecho *really* long time, and you might be able to run it by itself in
-\qecho parallel with other operations using a separate sesion.
+\qecho parallel with other operations using a separate session.
 \qecho ************************************************************************
 
 BEGIN;
@@ -16146,4 +16143,12 @@ CREATE INDEX ii_inv_idx on acq.invoice_item (invoice);
 CREATE INDEX ii_po_idx on acq.invoice_item (purchase_order);
 CREATE INDEX ii_poi_idx on acq.invoice_item (po_item);
 
+\qecho All Evergreen core database functions have been converted to
+\qecho use PLPERLU instead of PLPERL, so we are attempting to remove
+\qecho the PLPERL language here; but it is entirely possible that
+\qecho existing sites will have custom PLPERL functions that they
+\qecho will want to retain, so the following DROP LANGUAGE statement
+\qecho may fail, and that is okay.
+
+DROP LANGUAGE plperl;