Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find databaseChangeLog node with include

Tags:

yaml

liquibase

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.

like image 332
Vladimir Nani Avatar asked Nov 06 '15 09:11

Vladimir Nani


People also ask

What is Databasechangelog?

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.

What is DB changelog master Yaml?

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.


2 Answers

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

like image 113
Vladimir Nani Avatar answered Sep 20 '22 21:09

Vladimir Nani


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.

like image 45
iamjoshua Avatar answered Sep 20 '22 21:09

iamjoshua