Skip to content

Master Changelog

We strongly advise you to download and configure changelog schemas at your IntelliJ IDEA, this will be necessary to obtain IntelliSense when editing. More information here.

Before start, you should know:

  • Structure files .changelog.xml are always executed before data files .changelog.data.xml.
  • The default execution order is based on file's name.

This may cause a problem, for example 10.changelog.xml is executed before 2.changelog.xml. To properly handle this situation we created the changelog master file, it's optional and used to establish the execution order of structure and data files, to do so, you have to follow the rules given below:

  • The file must be named as: master.changelog.xml. Don't name any other file with this name.
  • The file must be placed at the root of mapping folder.
  • If declared, the file must contain all files to be executed. Files not listed won't be processed.

If you don't declare this file, CEAP will apply the default behaviour.

Example

See the image bellow:

Below you have this scenario demonstrated, notice that you have one node for structure and another to data files:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<changeLog xmlns="http://meceap.me.com.br/schema/changeLog-master-mapping"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://meceap.me.com.br/schema/changeLog-master-mapping http://docs.miisy.me/xsd/changelog-master-mapping.xsd">
    <structure>
        <file path="changelog/1.changelog.xml"></file>
        <file path="changelog/2.changelog.xml"></file>
        <file path="changelog/10.changelog.xml"></file>
    </structure>
    <data>
        <file path="changelogdata/1.changelog.data.xml"></file>
        <file path="changelogdata/2.changelog.data.xml"></file>
    </data>
</changeLog>

Pay attention: Always use forward slash to specify directory.

Extension

See the image bellow:

All information above remain the same for extensions, except the name of the file, in this case you must name as: master.ext.changelog.xml.

Tips

  • It's highly recommend to use this approach.
  • Core changelog master file master.changelog.xml will always be processed before extension master changelog file master.ext.changelog.xml.
  • If you define one type of master changelog, doesn't matter if core or extension, you have to define both, otherwise, files won't be processed.

Migrations

In addition to the structure and data definitions, the master file, including extension, also has the definitions of migrations of excel files. Previously these migrations were defined in the app.xml, this new approach is preferable.

The schema to define migrations is the same as before, see the example below:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<changeLog xmlns="http://meceap.me.com.br/schema/changeLog-master-mapping"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://meceap.me.com.br/schema/changeLog-master-mapping http://docs.miisy.me/xsd/changelog-master-mapping.xsd">
     <structure>
         <file path="changelog/1.changelog.xml"></file>
         <file path="changelog/2.changelog.xml"></file>
         <file path="changelog/10.changelog.xml"></file>
     </structure>
     <data>
         <file path="changelogdata/1.changelog.data.xml"></file>
         <file path="changelogdata/2.changelog.data.xml"></file>
     </data>
    <migrations>
        <changeSet id="baseData" author="author" description="base customRoot data" runAlways="false" runOnChange="false">
            <dataFile fileName="base01.data.xlsx"/>
            <dataFile fileName="base02.data.xlsx"/>
        </changeSet>
        <changeSet id="extraData" author="author" description="extra customRoot data" runAlways="false" runOnChange="false">
            <dataFile fileName="extra.data.xlsx"/>
        </changeSet>
    </migrations>
</changeLog>

XSD Download

How to manually configure xsd location at IntelliJ IDEA for IntelliSense here.