Upgrade the Evergreen database schema

The upgrade of the Evergreen database schema is the lengthiest part of the upgrade process for sites with a significant amount of production data.

Before running the upgrade script against your production Evergreen database, back up your database, restore it to a test server, and run the upgrade script against the test server. This enables you to determine how long the upgrade will take and whether any local customizations present problems for the stock upgrade script that require further tailoring of the upgrade script. The backup also enables you to cleanly restore your production data if anything goes wrong during the upgrade.

Caution

Pay attention to error output as you run the upgrade scripts. If you encounter errors that you cannot resolve yourself through additional troubleshooting, please report the errors to the Evergreen Technical Discussion List.

Run the following script as a user with the ability to connect to the database server. Adjust the arguments to the psql command to reflect your database server connection information:

cd /home/opensrf/Evergreen-ILS-2.2.5/Open-ILS/src/sql/Pg
psql -U evergreen -h localhost -f version-upgrade/2.1-2.2-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f version-upgrade/2.2.0-2.2.1-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f version-upgrade/2.2.1-2.2.2-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f version-upgrade/2.2.2-2.2.3-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f version-upgrade/2.2.3-2.2.4-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f version-upgrade/2.2.4-2.2.5-upgrade-db.sql evergreen