Non-obvious behavior with include
and SQL files with no changeset declaration
#4484
Open
2 tasks done
Labels
Search first
Description
If a changelog
include
s an SQL file with no--changeset
comment, the file is simply ignored without a warning or anything like that, which leads to really confusing behavior if you e.g. typo the word "changeset" or not make a comment at all.Steps To Reproduce
See https://github.com/K900/liquibase-ux-issue-repro for an example project.
Run
docker-compose up
to start a database and run Liquibase, which will report 0 changesets applied. Remove the extra dash on line 3 ofdata/example.sql
and rundocker-compose up
again to allow Liquibase to see the changeset and apply it correctly.Expected/Desired Behavior
Making this fail will probably be a breaking change, so maybe a warning for "you have SQL that is not part of any changeset"?
Liquibase Version
Tested on 4.23 and 3.8.2, but likely all of them
Database Vendor & Version
PostgreSQL 15
Liquibase Integration
CLI
Liquibase Extensions
none
OS and/or Infrastructure Type/Provider
not applicable
Additional Context
We actually ran into this and spent an hour or so chasing down a typo. Would be nice to have this at least warn by default :) I'm happy to submit a PR if someone is willing to point me at the right code for this.
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: