question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SkipMissingChangelogsSpringLiquibase

See original GitHub issue

We have a big multi-module maven project, that each module is independent in terms of everything starting from Liquibase files to the database schema to entity, service, controller layers … etc. But at end of the day, we have one main module that includes all such files as :

### db.changelog-master.yaml
databaseChangeLog:
  - include:
      file: classpath:db/changelog/module1.xml
  - include:
      file: classpath:db/changelog/module2.xml
.......
.......

The point is, in development-time, the developer doesn’t need to load all modules (each module is a maven profile, so one can exclude modules easily by just enabling/disabling profiles belonging to his own module)

Everything goes fine until we started the app, and Liquibase starts to complain about missing Liquibase configuration files. 😢

So to fix the issue we have to add our own SkipMissingChangelogsSpringLiquibase.java and use it to configure spring Liquibase bean.

We wished that time such a tolerated mechanism exists as part of Liquibase in order not to “hack” it.

So My question here is can we have this Code part of Liquibase so as to minimize the customization we (and maybe others) doing? (I can submit the PR 😉 )

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mhewedycommented, Jul 21, 2022

@kataggart

Here’s a Draft PR https://github.com/liquibase/liquibase/pull/3081

Please note that the old behavior of throwing exceptions when the file is not found will be broken… (see the below screenshot)

If you approve the new behavior, I can put more effort into the PR and fix the test cases…

what do you think?

image

1reaction
mhewedycommented, Jul 19, 2022

glad to hear that. once I have some free time, I will work on sending a PR.

thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find changelog location when spring-boot starts ...
As far as I can see (I do not use Spring Boot) you need to set the property spring.liquibase.change-log in the application.properties ....
Read more >
Spring Resource Accessor can't access change logs not from ...
Spring Resource Accessor can't access change logs not from a classpath. Liquibase Version: 4.2.0 Spring Boot Version: 2.3.4.
Read more >
Substituting Properties in Changelogs | Liquibase Docs
Liquibase allows dynamic substitution of properties in your changelog. ... Also, only the first definition is used, others are skipped.
Read more >
SpringLiquibase (liquibase-dist 3.8.1-local API) - javadoc.io
It will load db-changelog.xml from the classpath and apply it against myDataSource . <bean id="myLiquibase" class="liquibase.spring.SpringLiquibase" > ...
Read more >
One-Stop Guide to Database Migration with Liquibase and ...
This guide provides an overview of Liquibase and how to use it in a Spring Boot application for managing and applying database schema...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found