Have you implemented OpenMRS? Please participate in the Implementation Site Survey. If you already have, thank you!
Database updates are packaged into the war file in the liquibase-update-to-latest.xml file. When the user starts openmrs all necessary updates are run.
The problem is that if the user has a large database, some of the changesets take a really long time to run and so could keep users from (re)starting their system for several days. The goal of this module is to allow some changesets to be run before actually installing the new war file and therefore halting the system.
Some changesets can be run before doing the actual update (like adding indexes, adding columns, etc). Some changesets cannot be run unless the user is also starting to use the new war file (like renaming columns, removing columns, changing column types).
Changesets can be run in any order, they do not have to be sequential. Some changesets depend on the database being in a certain state, so some should require that others be already run. Whether or not a changeset has been run is stored by liquibase in the liquibasechangelog table.
Add a page to the administration screen that allows the user to upload a war file. Your page should pull the liquibase file and find all the unrun changesets. See the DatabaseUpdater class for some helpful methods to use or copy.
Allow the user to choose which changesets to run on their database now to try and get ahead of the update. Changesets that add or modify a column should not be allowed to run.
Bonus points for allowing users to "unrun" a changeset. Liquibase has a method for doing this.
Overview and Design Goals:
The goal of this project is to extract the changesets from an xml file called 'liquibase-update-to-latest.xml' which has to be extracted from the uploaded WAR file. Then, the user can manage the running of the changesets. That is, the user can choose which changesets to run ahead of the update. For instance, changesets like CreateIndexChange, CreateProcedureChange, CreateSequenceChange, CreateTableChange, CreateViewChange, AddChangeChange etc., can be considered as safe and the user can run such changesets ahead of the update.