...
The module liquibase.xml file is the newer alternative to the sqldiff.xml file.
- For liquibase conventions, see theĀ Datatypes and use of Liquibase section on the Conventions page
- Put the liquibase.xml file in the metadata folder (next to your config.xml)
- The liquibase file is run after any found sqldiff.xml file. This is so module's aren't forced to rewrite their sqldiff files into liquibase files for openmrs 1.7.
- See http://www.liquibase.org/manual/home#available_database_refactorings for xml element options
- It is recommended to prepend the moduleId to the id of the changeset so that it is guaranteed to differ from those in core or other modules e.g calculation-20140716-1415 where calculation is the moduleId
Example metadata/liquibase.xml file:
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
<!--
See http://www.liquibase.org/manual/home#available_database_refactorings
for a list of supported elements and attributes
-->
<changeSet id="mymoduleid-2010-05-25-15:50" author="bwolfe">
<delete tableName="global_property">
<where>property = 'myproperty'</where>
</delete>
</changeSet>
</databaseChangeLog>
|