Documentation

Database Upgrade Options

When a release, update, or fix pack has database schema changes, it’s helpful to know the options for applying the changes. Here you’ll find the database upgrade options for each schema change level and learn the general steps for using each upgrade option with your DXP/Portal installation type.

Here are the database upgrade options:

  • Docker image: Use the following environment variable when running the new DXP/Portal Docker image to auto-run the Database Upgrade Tool on the configured database.

    -e LIFERAY_UPGRADE_PERIOD_DATABASE_PERIOD_AUTO_PERIOD_RUN=true
    
  • Gogo Shell: While the server is running, you can execute Gogo Shell commands to list and invoke module upgrades. Note, core database upgrades require using a Docker image or the Database Upgrade Tool.

  • Database Upgrade Tool: While the server is offline, you can execute core and module database upgrades using the Database Upgrade Tool.

Important

This is supplemental information for upgrading DXP/Portal databases. Please see Upgrade Basics as a starting point for complete DXP/Portal upgrade instructions and see Maintaining a Liferay Installation for complete instructions on applying DXP/Portal updates and fix packs.

Database Upgrade Options for Schema Change Levels

Here are the types of database schema changes a release, update, or fix pack may have and the database upgrade options for applying those changes.

Database Schema Changes

Database Upgrade Options

Module micro version
(optional upgrades)

* Docker image
* Gogo Shell
* Database Upgrade Tool

Module major/minor version
(required upgrades)

* Docker image
* Gogo Shell
* Database Upgrade Tool

Core data schema
(required upgrades)

* Docker image
* Database Upgrade Tool

Database upgrades can be performed from the new installation you’re targeting or in a separate installation that’s more convenient for upgrading the database. for example, if you’re using an app server + Liferay WAR + dependencies, you can upgrade the database using the new Liferay Docker image, install the new Liferay WAR and dependencies to your app server, and restart your app server to run the new Liferay version.

There are three types of DXP/Portal installations:

  1. Liferay Docker image

  2. Liferay Tomcat Bundle

  3. Application server (app server) + Liferay WAR (WAR) + dependencies

Here are the general steps for using the database upgrade options with each installation type.

Database Upgrade for Liferay Docker Images

Here are process summaries for using a Docker image or Tomcat Bundle to perform database upgrade for a new Liferay Docker image.

Docker image option

Tomcat bundle option

Upgrade Process Summary

1. Configure the new image.
2. Run it with the upgrade environment variable enabled.
3. When the upgrades complete successfully, configure the database on a new container of the new image (do not enable upgrades).

1. Configure the Liferay Tomcat Bundle.
2. Run the Database Upgrade Tool from the bundle.
3. When the upgrades complete successfully, configure the database on the new Docker image.

Database Upgrade for Liferay Tomcat Bundles

Here are process summaries for using a Docker image or Tomcat Bundle to perform database upgrade for a new Liferay Tomcat Bundle.

Docker image option

Tomcat bundle option

Upgrade Process Summary

1. Configure the new Docker image.
2. Run it with the upgrade environment variable enabled.
3. When the upgrades complete successfully, configure the database on the new Liferay Tomcat Bundle.

1. Configure the new Liferay Tomcat Bundle.
2. Run the Database Upgrade Tool.

Database Upgrade for Application Server Installations

Here are process summaries for using a Docker image or Tomcat Bundle to perform database upgrade for a new Liferay DXP/Portal installation on an application server.

Docker image option

Tomcat bundle option

Upgrade Process Summary

1. Configure the new Docker image.
2. Run it with the upgrade environment variable enabled.
3. When the upgrades complete successfully, install the new Liferay WAR and OSGi dependencies on the application server.

1. Configure the new Liferay Tomcat Bundle.
2. Run the Database Upgrade Tool from the bundle.
3. When the upgrades complete successfully, install the new Liferay WAR and OSGi dependencies on the application server.