From 9ff0e469765105c78f8007810916a8e5dbfeaa36 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Tue, 29 Jan 2013 11:04:33 -0500 Subject: [PATCH] Apply all 2.2 upgrades prior to running 2.3.0 upgrade If users are expected to run all of the 2.2 upgrade scripts, then let's make it easy for them. As PostgreSQL 9.1 does not include the \ir "include relative path" command, we have to pause at the beginning of the upgrade process to ensure that the user is running the script from the right directory. Signed-off-by: Dan Scott Signed-off-by: Lebbeous Fogle-Weekley --- .../version-upgrade/2.2-2.3.0-upgrade-db.sql | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/sql/Pg/version-upgrade/2.2-2.3.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.2-2.3.0-upgrade-db.sql index a6cfd9a93b..911b14d7eb 100644 --- a/Open-ILS/src/sql/Pg/version-upgrade/2.2-2.3.0-upgrade-db.sql +++ b/Open-ILS/src/sql/Pg/version-upgrade/2.2-2.3.0-upgrade-db.sql @@ -2,6 +2,14 @@ \set eg_version '''2.3.0''' +\qecho ********************************************************************** +\qecho Your current working directory when you run this script *must* be +\qecho Open-ILS/src/sql/Pg/version-upgrade/ or it will fail to find the point +\qecho release upgrade scripts. Press to continue, or hit to +\qecho prevent the upgrade from happening. +\qecho ********************************************************************** +\prompt chance-to-quit + \qecho The following statement might fail, and that is okay; we are \qecho ensuring that an upgrade that should have been applied during \qecho the 2.2 upgrade is actually applied now. @@ -14,7 +22,18 @@ UPDATE config.org_unit_setting_type SET grp = 'acq' WHERE name LIKE 'acq%'; +\qecho Apply previous point release upgrades to ensure that all known fixes are +\qecho in place. Failures here will generally indicate that the fixes were +\qecho already applied. + +\i 2.2.0-2.2.1-upgrade-db.sql +\i 2.2.1-2.2.2-upgrade-db.sql +\i 2.2.2-2.2.3-upgrade-db.sql +\i 2.2.3-2.2.4-upgrade-db.sql +\i 2.2.4-2.2.5-upgrade-db.sql + \qecho The real upgrade begins now. +\set eg_version '''2.3.0''' BEGIN; INSERT INTO config.upgrade_log (version, applied_to) VALUES ('2.3.0', :eg_version); @@ -910,7 +929,6 @@ BEGIN END; $func$ LANGUAGE plpgsql; - -- Evergreen DB patch 0727.function.xml_pretty_print.sql -- -- A simple pretty printer for XML. -- 2.43.2