[OPEN-ILS-GENERAL] Upgrade Script for 2.6.4 to 2.7

Lazar, Alexey Vladimirovich alexey.lazar at mnsu.edu
Mon Mar 16 18:46:58 EDT 2015


On 2015-03-15, at 22:53 , Jayaraj JR <jayaraj at iisertvm.ac.in> wrote:

> As of now, we are already on Evergreen 2.6.4 version. In this context what would be best way to upgrade to 2.7 series. Can we use 
> the upgrade script 2.6.3 to 2.7.0 here. If not what modifications are necessary ?. If we upgrade to 2.6.7, will it cause further complexity 
> when upgrading to the 2.7 version.

Generally speaking, you need to examine your upgrade log and cross-reference the major and minor schema upgrade scripts up to the version you’re upgrading to. Then you should modify schema upgrade scripts to make custom versions that include all the numbered schema upgrades that you need to apply and exclude all the numbered schema updates that have already been applied.

Specifically for version 2.6.4, the 2.6.3-2.6.4 schema upgrade script includes schema upgrades 0892, 0893, 0894, 0895.

The 2.6.3-2.7.0 upgrade script includes upgrades 0884, 0885, 0886, 0888, 0889, but not any of the upgrades included in the 2.6.3-2.6.4. So, you should be able to run the 2.6.3-2.7.0 schema upgrade script against your version without trouble.

If you look at the 2.7.0-2.7.1 schema upgrade script, it has schema upgrades 0892, 0893, 0894, 0895, which is equivalent to the 2.6.3-2.6.4 script. So, you will need to modify the 2.7.0-2.7.1 script to exclude all those upgrades, but you probably want to keep the 2.7.1 version stamp, so your modified 2.7.0-2.7.1 script will look like this:

--Upgrade Script for 2.7.0 to 2.7.1
\set eg_version '''2.7.1'''
BEGIN;
INSERT INTO config.upgrade_log (version, applied_to) VALUES ('2.7.1', :eg_version);
COMMIT; 

>From then on you should just be fine with the rest of the 2.7 series minor version schema upgrade scripts, but check for yourself.

When you’re done upgrading, your goal is to make sure that the schema is in accordance with it’s expected state for that particular version. If your database ends up missing any of these numbered upgrades, you may later discover the consequences in surprising ways.

Also, keep in mind what Galen recommended earlier in this thread: checking through all of the point schema upgrades you plan to apply and seeing if there are any redundant bib reingests that you can skip can save you some time.

Aleksey Lazar
IS Developer and Integrator - PALS
http://www.mnpals.org/



More information about the Open-ils-general mailing list