Skip to content

I-TECH-UW/openmrs-upgrade

Repository files navigation

OpenMRS Upgrade

This guide provides instructions on how to perform an OpenMRS upgrade using Docker and Liquibase.

This project assumed an upgrade from OpenMRS upgrade from 2.2.x to 2.6.x

You can add the neccessary liquibase files as needed for you upgrade. See here

Prerequisites

  • Docker and Docker Compose should be installed on your machine.
  • You need access to the MySQL database container and the OpenMRS project directory.
  • Add the OpenMRS database to upgrade under db (Ensure you have a backup of the database)

Steps to Upgrade OpenMRS

1. Run Docker Compose for the Database

The first step is to start the MySQL database container using Docker Compose. This will launch the database container required for the upgrade process.

docker compose -f docker-compose.database.yml up

2. Build the Liquibase Docker Image

Before running the Liquibase migration, build the necessary Docker image for Liquibase.

docker build . -t liquibase-mysql

3. Run Docker Compose for Liquibase Migration

After building the Docker image for Liquibase, you can now run the Docker Compose configuration to apply the necessary Liquibase migrations to your OpenMRS database.

docker compose -f docker-compose.liquibase.yml up

4. Verifying the Migration

Once you've run the Docker Compose command for Liquibase, it will apply the migrations from the specified changelog files to your MySQL database. You can verify the migration by checking the logs of the Liquibase container:

5. Dump the Database

After the migration process, create a dump of your updated database.

Dump the Database from MySQL

To dump your database from the MySQL container, you can use the mysqldump command. Run the following command from your terminal:

docker exec -t openmrs-db mysqldump -u openmrs -popenmrs openmrs > updatedDB.sql

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published