Bug? Liquibase does not throw error during migration for bad sql

Full example available at the links below.

In the migration file, i am trying to insert rows in a table which does not exist, however Liquibase still reports this migration as successful: liquibase-does-not-show-errors-in-migration/2022-02-13--10-56-43-test migrations.sql at master · TheBestPessimist/liquibase-does-not-show-errors-in-migration · GitHub

Is this a bug, or am i doing something wrong?

It is also weird that the first inserts don’t work either. Only the table is created and nothing more.

Also: i have tried and tried, but i cannot figure out how liquibase.properties is supposed to work. The documentation doesn’t make it clear.
I cannot enable debug logs: liquibase-does-not-show-errors-in-migration/liquibase.properties at master · TheBestPessimist/liquibase-does-not-show-errors-in-migration · GitHub

The log is as follows:

Feb 13, 2022 12:21:08 PM liquibase.lockservice
INFO: Successfully acquired change log lock
Feb 13, 2022 12:21:08 PM liquibase.changelog
INFO: Reading resource: db/migrations/2022-02-13--10-56-43-test migrations.sql
Feb 13, 2022 12:21:08 PM liquibase.changelog
INFO: Creating database history table with name: DATABASECHANGELOG
Feb 13, 2022 12:21:08 PM liquibase.changelog
INFO: Reading from DATABASECHANGELOG
Running Changeset: db/migrations/2022-02-13--10-56-43-test migrations.sql::raw::includeAll
Feb 13, 2022 12:21:08 PM liquibase.changelog
INFO: Custom SQL executed
Feb 13, 2022 12:21:08 PM liquibase.changelog
INFO: ChangeSet db/migrations/2022-02-13--10-56-43-test migrations.sql::raw::includeAll ran successfully in 13ms
Feb 13, 2022 12:21:08 PM liquibase.lockservice
INFO: Successfully released change log lock

When you run the liquibase command, typically the liquibase.properties is in the directory where the command is run. But you don’t need it here. I would test each part separately before doing the master changelog. It’s important that failures are thrown at each level, because otherwise it’s blissfully unaware there’s a problem - if it was skipping the end of your sql file, for example and exited 0.

liquibase update (connect information) --changelog-file=<your sql changelog> --logLevel=debug

should print copious amounts of debug information. You could also try the dry run to see
what it’s actually running.

liquibase update-sql (connect information) --changelog-file=<your sql changelog> --logLevel=debug

Hello,

I don’t quite understand what you mean.

I’m not running liquibase from cli, but directly from Kotlin code. So I expected liquibase to take that properties from the same place where all properties files reside.

Also, I don’t understand how you answer deals with the “lack of error” during the liquibase migration.

Could you maybe explain one more time?