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.

cd /home/opensrf/Evergreen-ILS-2.5.5/Open-ILS/src/sql/Pg
psql -U evergreen -h localhost -f version-upgrade/2.4.3-2.5.0-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f version-upgrade/2.5.0-2.5.1-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f version-upgrade/2.5.1-2.5.2-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f version-upgrade/2.5.2-2.5.3-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f version-upgrade/2.5.3-2.5.4-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f version-upgrade/2.5.4-2.5.5-upgrade-db.sql evergreen


After the 2.4.3-2.5.0-upgrade-db.sql script finishes, you will see a note on how to reingest your bib records. You should reingest your records after you have completed the entire upgrade and tested your system. Reingesting records will take a long time depending on the number of bib and authority records in your system. Reingesting will need to be done before the new “Browse the Catalogue” feature can find all of your existing records.