From: Thomas Berezansky Date: Thu, 29 Mar 2012 14:15:30 +0000 (-0400) Subject: Stamping No plperl Upgrade Script X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=082bb7963d7c7dec1c0f9859d2ff16dad2221eec;p=contrib%2FConifer.git Stamping No plperl Upgrade Script Signed-off-by: Thomas Berezansky --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 52dbf17c01..c2fc9a03ec 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -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 ('0695', :eg_version); -- phasefx/tsbere +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0696', :eg_version); -- tsbere CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0696.no_plperl.sql b/Open-ILS/src/sql/Pg/upgrade/0696.no_plperl.sql new file mode 100644 index 0000000000..38ba02898b --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0696.no_plperl.sql @@ -0,0 +1,28 @@ +-- Evergreen DB patch 0696.no_plperl.sql +-- +-- FIXME: insert description of change, if needed +-- +BEGIN; + +-- check whether patch can be applied +SELECT evergreen.upgrade_deps_block_check('0696', :eg_version); + +-- Re-create these as plperlu instead of plperl +CREATE OR REPLACE FUNCTION auditor.set_audit_info(INT, INT) RETURNS VOID AS $$ + $_SHARED{"eg_audit_user"} = $_[0]; + $_SHARED{"eg_audit_ws"} = $_[1]; +$$ LANGUAGE plperlu; + +CREATE OR REPLACE FUNCTION auditor.get_audit_info() RETURNS TABLE (eg_user INT, eg_ws INT) AS $$ + return [{eg_user => $_SHARED{"eg_audit_user"}, eg_ws => $_SHARED{"eg_audit_ws"}}]; +$$ LANGUAGE plperlu; + +CREATE OR REPLACE FUNCTION auditor.clear_audit_info() RETURNS VOID AS $$ + delete($_SHARED{"eg_audit_user"}); + delete($_SHARED{"eg_audit_ws"}); +$$ LANGUAGE plperlu; + +-- And remove the language so that we don't use it later. +DROP LANGUAGE plperl; + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.no_plperl.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.no_plperl.sql deleted file mode 100644 index c2157db81f..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.no_plperl.sql +++ /dev/null @@ -1,17 +0,0 @@ - --- Re-create these as plperlu instead of plperl -CREATE OR REPLACE FUNCTION auditor.set_audit_info(INT, INT) RETURNS VOID AS $$ - $_SHARED{"eg_audit_user"} = $_[0]; - $_SHARED{"eg_audit_ws"} = $_[1]; -$$ LANGUAGE plperlu; - -CREATE OR REPLACE FUNCTION auditor.get_audit_info() RETURNS TABLE (eg_user INT, eg_ws INT) AS $$ - return [{eg_user => $_SHARED{"eg_audit_user"}, eg_ws => $_SHARED{"eg_audit_ws"}}]; -$$ LANGUAGE plperlu; - -CREATE OR REPLACE FUNCTION auditor.clear_audit_info() RETURNS VOID AS $$ - delete($_SHARED{"eg_audit_user"}); - delete($_SHARED{"eg_audit_ws"}); -$$ LANGUAGE plperlu; - -DROP LANGUAGE plperl;