on-missing-include-changelog
The on-missing-include-changelog
global parameter controls how Liquibase behaves when it cannot find a changelog specified in an include
tag in the root changelog. It is available in Liquibase 4.19.1+.
If you set on-missing-include-changelog
to WARN
and the included changelog is not present, a warning message will appear in Liquibase logs. If it is set to FAIL
and the included changelog is not present, Liquibase returns an error. The default configuration is FAIL
. We recommend setting it to WARN
.
Uses
If your included changelog was removed by accident, Liquibase will notify you immediately so you know the exact cause of the error. With on-missing-include-changelog
enabled, you will be able to quickly determine why the file is missing and how to restore it.
Syntax
You can set this parameter in the following ways:
Option | Syntax |
---|---|
Liquibase properties file (defaults file) |
|
Global flow file argument (example) |
|
Global CLI parameter |
|
JVM system property (JAVA_OPTS Environment Variable) |
|
Liquibase Environment Variables |
|
For more information, see Working with Command Parameters.
Output
If you set --on-missing-include-changelog
to WARN
and Liquibase cannot find the changelog you specify in <include>
, your log output displays the following:
[2023-07-24 12:59:38] FINE [liquibase.resource] Path com/example/news/news.changelog.sql in /home/my_username/Datical/liquibase-pro-tests/tmp/project does not exist (liquibase.resource.DirectoryResourceAccessor (/home/my_username/Datical/liquibase-pro-tests/tmp/project))
[2023-07-24 12:59:38] FINE [liquibase.configuration] Found 'liquibase.onMissingIncludeChangelog' configuration of 'WARN'
command argument '--on-missing-include-changelog' of 'WARN'
[2023-07-24 12:59:38] WARNING [liquibase.changelog] The file com/example/news/news.changelog.sql was not found in the configured search path: