MySQL database schema upgrade for Tigase 5.1

Unfortunately we had to make a small change to the database schema for 5.1.0 version of the Tigase server.

The good news it does not affect data or data structure, only the way some data is accessed in database. We added one more stored procedure which has to be installed in database if you upgrade your installation from a previous Tigase version.

Therefore the schema upgrade is very simple and safe but make sure the current database schema is in version 4.0. If you happen to use ancient version of the Tigase before number 4.0 and you want to upgrade to 5.1 you have to run 4.0 upgrade script first.

Assumptions:

  1. tigasedb is a database name
  2. tigase_user is a database user name
  3. mypass is database user password

First things first - make a database backup:

mysqldump -u tigase_user -pmypass tigasedb > tigasedb_dump.sql

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

msyqladmin -u tigase_user -pmypass drop tigasedb
mysqladmin -u tigase_user -pmypass create tigasedb
mysql -u tigase_user -pmypass tigasedb < tigasedb_dump.sql

Note! You may be required to use root user and his password to execute mysqladmin commands.

Now we can run schema upgrade script

mysql -u tigase_user -pmypass tigasedb < database/mysql-schema-upgrade-to-5-1.sql
Application: 

Comments

The console log is
Please upgrade database schema now.
Current scheme version is: 4.0, expected: 5.1
Check the schema upgrade guide at the address:
http://www.tigase.org/content/tigase-51-database-schema-upgrad

Error occur.

helen@helen:~/opensips/tigase/tigase-server-5.1.0-b3002$ sudo mysql -u tigase_user -pmypass tigasedb < database/mysql-schema-upgrade-to-5-1.sql
NOW() - Installing missing stored procedures
2013-02-01 21:46:45 - Installing missing stored procedures
ERROR 1305 (42000) at line 48: PROCEDURE tigasedb.TigPutDBProperty does not exist

what should I do?

Did you have previous schema installed correctly? It looks like you were missing TigPutDBProperty stored procedure which should be there if you used any database schema for previous versions.