OpenMRS database auto update

A few days ago, I started making an initial patch to OpenMRS to update the database to the required version at the deployment time of the web application automatically using Liquibase, a unique tool to perform the database changes in a database implementation independent manner. This will eliminate the step where the user has to run the update-to-latest-db.mysqldiff.sql SQL script using the mysql client program in a shell. And it is database server type independent. Also this eliminates the dependence on mysql client program.

OpenMRS web application calls the Liquibase programatically at startup. It will read the database changes from an XML file and mark the performed database changes in a dedicated table. This works in a similar manner to how the database updates are done in the OpenMRS modules at present.

Update: See ticket #974

Advertisements
Explore posts in the same categories: OpenMRS

2 Comments on “OpenMRS database auto update”

  1. Ben Says:

    I really like the potential of liquibase. I’ve added “liquibase” as a topic for tomorrow’s dev call: http://openmrs.org/wiki/2008-08-14_Developers_Conference_Call It would be great if you could join us / stay around for that. Depending on your timing we could schedule that near the beginning or end of the conf call.

    Can you open a ticket and attach your patch for this? It’d be nice if other devs could see how easy this would be.

  2. Burke Says:

    Cool! We were looking for something like this a while ago. Combining tooling like this with a web-based wizard at startup could make OpenMRS a whole lot easier to upgrade and administer.

    Thanks Upul!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: