generateChangelog does not order views correctly based on usage


we use maven to build our project and fabric8 maven plugin to create an image of our project, As path of our integration test (in our maven build), we kick off a postgres image and our project image using docker which then populates our postgres with our liquibase changesets, rolls it back and repopulates it just to validate the updates and the rollbacks of all our changesets in a junit test configured to the containerized database and using the java Liquibase class. as path of the cleanup of the integration test part of our build, we generate a changelog file with our containerized postgres db which has all our changesets db updates so that the new changelog file can be used for our unit tests in subsequent builds. this is necessary because we use h2 db for our unit test and require all changesets to be liquibase tag based to avoid issues with database specific sql in some of our changesets. this largely works except that we have a view that uses another view and liquibase doesn't seem to recognise that it needs to output the views in the right order, which means that when you use the changelog file, it fails because it doesn't find the missing view/table. We can manually fix this but i believe this is a bug in the generateChangelog process so I decided to report it.

to make my point more understandable

  • view A selects from an existing table

  • view B select from an existing table as well as from view A

generateChangelog should output view A first but instead, outputs view B first and then View A. This causes the issue as view B doesnt find any reference to view A when it tries to execute the changeset. its simply a question of correct ordering based on view dependencies.


Spring boot project, built with maven


Franklin Ike


Affects versions