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.


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 steps as a user with the ability to connect to the database server. Please adjust the arguments to the psql command and the PG* environment variables for the 2.3-2.4-supplemental.sh command to reflect your database server connection information. To supply the pasword, you can create a PostgreSQL password file.

cd /home/opensrf/Evergreen-ILS-2.4.2/Open-ILS/src/sql/Pg
psql -U evergreen -h localhost -f version-upgrade/2.3-2.4.0-upgrade-db.sql evergreen
PGDATABASE=evergreen PGUSER=evergreen PGHOST=localhost version-upgrade/2.3-2.4-supplemental.sh
psql -U evergreen -h localhost -f version-upgrade/2.4.0-2.4.1-upgrade-db.sql evergreen