To upgrade an existing PostgreSQL policy database from version 9.0.X.X to version 9.1.X.X, use the provided upgrade SQL scripts as directed.
These instructions apply only to non-Docker deployments of PingAuthorize versions 9.0.X.X (EA and GA) and 9.1.X.X (EA and GA). Earlier versions don't support PostgreSQL, and later versions require the db-cli tool to upgrade PostgreSQL databases.
Prepare the Policy Editor by selecting one of the following
- If you haven't upgraded the Policy Editor, follow the steps for Installing the PingAuthorize Policy Editor noninteractively to create and start up a new instance of the server at the target version.
- If you have already upgraded the Policy Editor to the
target version, run the start-server command, as
After you execute the start-server command, the application checks the PostgreSQL database schema version against the version of the Policy Editor and provides the locations of any necessary upgrade scripts, as illustrated in the following example:
The policy database at 'jdbc:postgresql://<postgresql_host>:<postgresql_port>/<postgresql_db_name>' is older than this version of PingAuthorize (188.8.131.52). Please use the following scripts to upgrade the policy database before running start-server again: A) https://github.com/pingidentity/pingauthorize-contrib/blob/main/sql/postgresql/9.1-EA.sql B) https://github.com/pingidentity/pingauthorize-contrib/blob/main/sql/postgresql/9.1-GA.sql
Download and apply the upgrade scripts for the policy database schema versions
between your current version and the target version, as indicated in the
You must apply the scripts incrementally, not concurrently, and in sequence from oldest to newest.
For example, to upgrade from 9.0.X.X-GA to 9.1.X.X-GA, you must apply both the 9.1-EA and 9.1-GA upgrade scripts:
$ wget https://raw.githubusercontent.com/pingidentity/pingauthorize-contrib/main/sql/postgresql/9.1-EA.sql $ psql --dbname=<postgresql_db_name> --file=9.1-EA.sql >/dev/null $ wget https://raw.githubusercontent.com/pingidentity/pingauthorize-contrib/main/sql/postgresql/9.1-GA.sql $ psql --dbname=<postgresql_db_name> --file=9.1-GA.sql >/dev/null
After you apply the specified SQL scripts, the PostgreSQL database upgrade is complete. The Policy Editor should now start successfully using the target version of the PostgreSQL database. You can verify this by running the start-server command.