- 2 Minutes to read
- Print
- PDF
Step 6: Upgrading Database
- 2 Minutes to read
- Print
- PDF
Warning:
Make sure that a backup of the platform has been created before you upgrade the iObeya database scheme.
Use the Backup and restore section to create your backup.
If an error occurs when you run the scripts, please stop and contact our Support team.
Starting with iObeya version 4.20, Liquibase is used to version control the iObeya database schema:
Liquibase is an open-source database-independent library for tracking, managing, and applying database schema changes.
It provides a way to apply changes to the database in a consistent and trackable manner.
In this article, learn how to use Liquibase to upgrade the iObeya database schema.
About Liquibase directory structure
In the iObeya packages you have downloaded, you find a Liquibase directory containing the following files and directories:
iobeya-sql-changelog.jar (the Liquibase changesets package containing all the changes to initialize the iObeya database)
mysql
mysql-connector-java.jar (the JDBC driver for MySQL)
liquibase.properties (Liquibase configuration file preconfigured for MySQL)
mariadb
mariadb-java-client.jar (the JDBC driver for MariaDB)
liquibase.properties (Liquibase configuration file preconfigured for MariaDB)
oracle
ojdbc8.jar (the JDBC driver for Oracle)
liquibase.properties (Liquibase configuration file preconfigured for Oracle)
Configuring Liquibase
You need to edit the preconfigured liquibase.properties file corresponding to your database server to provide the information that Liquibase needs to connect.
Warning:
Even if it’s possible, we strongly recommend that you do not include authentication information in your liquibase.properties file.
You can use instead command-line arguments to provide sensitive credentials using environment variables for instance.
From the root directory of the iObeya packages:
Open the liquibase directory.
Open the directory corresponding to your database server (e.g mariadb, mysql, oracle).
Edit the liquibase.properties file.
Change the following parameters:
liquibase.command.url: provide the url and port of your database server
Warning:
By default, the installation procedure creates a database schema named iobeya.
If you changed the database schema name during the installation process, you need to change this value in the url parameter defined in the liquibase.properties file. Check the value that was configured in the context file deployed on your running instance.
Upgrading the iObeya database schema
Open a terminal window in the liquibase directory.
MySQL: Upgrading the iObeya database schema
Run the following command to upgrade your database for the migration to the latest version on-premises of iObeya:
java -jar iobeya-sql-changelog.jar --defaultsFile=mysql/liquibase.properties --username=<ROOT_USERNAME> --password=<ROOT_PASSWORD> update
Replace <ROOT_USERNAME> and <ROOT_PASSWORD> with the ROOT username and password of your MySQL server.
Liquibase is going to execute the changesets required to upgrade the iObeya database schema. At the end of the process, you see the following message:
Liquibase command 'update' was executed successfully.
MariaDB: Upgrading the iObeya database schema
Run the following command to upgrade your database for the migration to the latest version on-premises of iObeya.
Replace <ROOT_USERNAME> and <ROOT_PASSWORD> with the ROOT username and password of your MariaDB server.
java -jar iobeya-sql-changelog.jar --defaultsFile=mariadb/liquibase.properties --username=<ROOT_USERNAME> --password=<ROOT_PASSWORD> update
Liquibase is going to execute the changesets required to upgrade the iObeya database schema. At the end of the process, you should see the following message:
Liquibase command 'update' was executed successfully.
Oracle: Upgrading the iObeya database schema
Run the following command to upgrade your database for the migration to latest version on-premises of iObeya.
java -jar iobeya-sql-changelog.jar --defaultsFile=oracle/liquibase.properties --username=<DATABASE_USERNAME> --password=<DATABASE_PASSWORD> update
Replace <DATABASE_USERNAME> and <DATABASE_PASSWORD> with the values configured in the context file deployed on your running instance.
Liquibase is going to execute the changesets required to upgrade the iObeya database schema. At the end of the process, you should see the following message:
Liquibase command 'update' was executed successfully.