OpenMRS uses a tool called Liquibase (http://www.liquibase.org/) to take care of database changes on application startup.
The tool keeps track of all changes to the database and updates the local database when starting up the application.
The tools also helps to allow users to create a new database from the browser when starting up the first time.
All in all it provides some great improvements to usability and simplifies implementation. I think of the thousand of installations in India needing database changes as on use case that could benefit from this…
A summary from OpenMRS on what Liquibase added:
All database updates are now executed when the API is started. No need to source a .sql file on your database directly.
There is a setup wizard in the war file now. The wizard will walk you through creating your database and your runtime properties file.
I agree the new openmrs installation and update process is very slick. Does anyone have the time to investigate further how we might apply something similar. Student project?
I agree the new openmrs installation and update process is very slick. Does anyone have the time to investigate further how we might apply something similar. Student project?
I had tutored one student nishtha who was learning java to implement these beautiful looking setup screens of openmrs.
So I know its quite simple to inplement and applying updates works quite out of the box in liquibase. Though I don't fully understand why we want to use it in dhis.
···
Sent from my BlackBerry®
-----Original Message-----
From: Bob Jolliffe <bobjolliffe@gmail.com>
Date: Tue, 29 Sep 2009 11:54:08
To: Ola Hodne Titlestad<olatitle@gmail.com>
Cc: DHIS 2 developers<dhis2-devs@lists.launchpad.net>
Subject: Re: [Dhis2-devs] Use liquibase to deal with database changes and to
simplify DHIS update process?
The main reason as I see it will be to avoid manual sql update scripts on all existing installations every time there is a change to the database that Hibernate cannot take care of. That happened quite often in the past, and still happens from time to time, although not as often as before as the data model has stabilised. If liquibase can track all changes to the data model (“master database”) and make sure the local database gets updated when loading a new war file that would be a great simplification of the update process I think. And my understanding is that it is used in openmrs for exactly the same reason. Why do you see DHIS as different from OpenMRS when it comes to using liquibase?
I had tutored one student nishtha who was learning java to implement these beautiful looking setup screens of openmrs.
So I know its quite simple to inplement and applying updates works quite out of the box in liquibase. Though I don’t fully understand why we want to use it in dhis.
Openmrs started using liquibase because these database scripts were taken from mysqldump and could not b used with other dbms many times. Liquibase makes it kind of database independent.
Don’t get me wrong I really love liquibase, but it also adds some xml overhead and small but learning curve.
The way I see openmrs and dhis different is that the dhis model is made by the user and its ui driven. Most of the basics are very much stable. Openmrs on the other hand is changing its model and not user, but developer driven. These reasons made me ask question if others feel the need to have liquibase for database chnages
I had tutored one student nishtha who was learning java to implement these beautiful looking setup screens of openmrs.
So I know its quite simple to inplement and applying updates works quite out of the box in liquibase. Though I don’t fully understand why we want to use it in dhis.
Hi Saptarshi,
The main reason as I see it will be to avoid manual sql update scripts on all existing installations every time there is a change to the database that Hibernate cannot take care of. That happened quite often in the past, and still happens from time to time, although not as often as before as the data model has stabilised. If liquibase can track all changes to the data model (“master database”) and make sure the local database gets updated when loading a new war file that would be a great simplification of the update process I think. And my understanding is that it is used in openmrs for exactly the same reason. Why do you see DHIS as different from OpenMRS when it comes to using liquibase?