PostgreSQL Database Schema Upgrade for Tigase 5.1

The schema upgrade is very simple and safe but make sure the current database schema is in version 4.0.


  • tigasedb is a database name
  • tigase_user is a database user name
  • admin_db_user is database admin user name

First things first - make a database backup:

pg_dump -U tigase_user -W tigasedb > tigasedb_dump.sql

If you need to restore database for any reason execute following commands:

dropdb -U admin_db_user -W tigasedb
createdb -U admin_db_user -W -O tigase_user tigasedb
psql -U tigase_user -W tigasedb < tigasedb_dump.sql

Now we can run schema upgrade script

psql -q -U tigase_user -W tigasedb -f database/postgresql-schema-upgrade-to-5-1.sql