If so, Liquibase calculates the checksum of the XML change set and checks if this is the same as the stored checksum.If not, the change set is applied and the entry is inserted in the Liquibase table.The MD5SUM column contains the checksum of the change set, so any change in the change set in the XML file will result in a different checksum.Īt each execution, for each change set defined in the XML, Liquibase checks if its ID/author (in the example: 1.0.0-1/wiki) is stored in the database: When Liquibase runs these change sets, it stores the ID of all the successfully applied change sets in its own database, along with the checksum of these change sets.įor example, for the first change set of the above changelog ( id=ᐦ1.0.0-1ᐦ), the following entry is inserted in the Liquibase table (DATABASECHANGELOG): ID: 1.0.0-1įILENAME: db/changelog/wiki.db.changelog-1.0.0.xml Here is an example from the eXo Wiki application: How does it work?ĭatabase changes are defined as a set of change sets in XML files. But first let’s look at the mechanics of Liquibase. Here we will tell you some of the reasons you might need to modify a change set and how to do it. While it is good practice not to modify these already applied change sets, it is sometimes necessary. And this is what we are going to talk about here. It also checks that the applied change sets have not been modified in the changelog file. Once a change set has been applied, Liquibase remembers it and does not apply it again on the next startup. These changes are defined as a list of change sets that Liquibase will apply when it is executed (at startup in the case of eXo Platform). It makes it easy to update database schema (add/remove table, add/remove column, add an index,etc) or database content (update rows, etc). EXo Platform uses Liquibase to manage its database evolutions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |