Liquibase "update" command in springboot

I am trying to embed to liquibase changeset in a Springboot application. Initially, I have one changeset.xml in the master using include. It worked great. I can see the database is initialized with the tables for my changesets at start. For the second run, I added another changeset. However, Liquibase did not skip the first changeset and still attempting to create those tables.

Is there a “update” option in applicaton.yml file?
here’s what I have

change-log: classpath:db/changelog/db.changelog-master.yaml
default-schema: my_schema

The “update” command is what automatically gets run on application start, there is nothing extra you need to specify for that. The fact that it’s trying to re-run your first changelog means that something is wrong in that update operation.

I can’t tell what’s wrong off hand from the info you gave. What liquibase does is compare the filepath + id + author of each changeset in the changelog file with what is in the databasechangelog table. Any changesets with that identifier combination in the table gets skipped, any ones that are not in the table are ran.

  • Are you making any changes to the id/author/filepath of the original changeset you ran?
  • Are modifying the original changeset in any way, or just adding to it?
  • The logs should list the id/author/filepath of your first changelog. How does the values for those being logged compare to what is in the databasechangelog table?