Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

liquibase mark changeset applied

How is it possible to mark specific changeset as applied in liquibase maven plugin? There's nothing about that in documentation, the command markNextChangeSetRan seems to do nothing.

like image 608
jdevelop Avatar asked Oct 27 '25 09:10

jdevelop


1 Answers

There is a "hacky" solution for this problem:

  1. Delete all the children of the problematic changeSet XML element. Remember to leave the changeSet with its id and author parameters in the liquibase XML file.
  2. Run mvn liquibase:update
    • It should say it ran the required specific changeSet.
  3. Revert the XML file that you modified.
  4. Run mvn liquibase:update again
    • You will get Validation Failed: 1 change sets check sum with the new sum. Copy that new check sum from the error.
  5. Paste the check sum manually into the right record in the DATABASECHANGELOG table of the target database.
like image 105
Dan P Avatar answered Oct 29 '25 07:10

Dan P