Search code examples
liquibase

Update existing IDs of changesets


I have to update IDs in all changesets to follow the convention of naming. What is a correct sequence of doing that?

  1. Update DATABASECHANGELOG table with new IDs
  2. Update XML with changesets with new IDs
  3. Clear checksums
  4. Run liqibase

?


Solution

  • Yes, sequence of

    1. Update DATABASECHANGELOG table with new IDs
    2. Update XML with changesets with new IDs
    3. Clear checksums (or just set databasechangelog.MD5SUM = null)
    4. Run liquibase
    

    looks about right.

    Or if your changeSets are simple enough, you can just update xml changeset IDs and make sure all of them will fail with preConditions.