I`m trying to include changeset.yaml file into changelog.yaml for Liquidbase.
file changelog.yaml
databaseChangeLog:
- include:
file: migrations/changeset.yaml
changeset.yaml
changeset:
id: 1
author: vlad
Getting this when executing update
Unexpected error running Liquibase: Could not find databaseChangeLog node
Any ideas why? Thanks.
UPDATE: Seems to be the same if im using xml format.
Liquibase Concepts Simply put – a changelog contains an ordered list of changesets, and a changeset contains a change. You and your team can specify database changes in one of four different changelog formats: SQL, XML, JSON, or YAML. And, you can even mix and match different types of changelogs, if desired.
The db/changelog/db.changelog-master.yaml file is the one executed on application startup when using default configuration. In that file you can have the sequential SQL changes as well as inclusions to other files.
changeset.yaml must contain databaseChangeLog So in my case i should have had this:
changeset.yaml
databaseChangeLog:
- changeset:
id: 1
author: vlad
Documentation wasn`t really helpful. Found answer here in github
In my case, I've already declared the node properly, but it turns out I forgot to create spaces for include which should be -(space)include and -changeset which should be -(space)changeSet in my YML files . Also the spelling for one of my YML file which was a databaseChangelog which should have had a capital L and should be databaseChangeLog. Afterall those mistype syntaxed, the error was gone alright.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With