I expected to see an error message about the syntax error in the script.
What did you see instead?
C:\projects\flyway_test_1>flyway -url="jdbc:postgresql://localhost:6543/flyway_test" -user=postgres -password=postgres_pw migrate
Flyway Community Edition 6.4.1 by Redgate
Database: jdbc:postgresql://localhost:6543/flyway_test (PostgreSQL 12.2)
Successfully validated 1 migration (execution time 00:00.018s)
Creating Schema History table "public"."flyway_schema_history" ...
Current version of schema "public": << Empty Schema >>
Migrating schema "public" to version 1 - initial schema [non-transactional]
ERROR: Migration of schema "public" to version 1 - initial schema [non-transactional] failed! Please restore backups and roll back database and code!
ERROR: Unable to release PostgreSQL advisory lock
The text was updated successfully, but these errors were encountered:
The problem is the command line is only reporting the top-level error message; we'll add a fix for 6.4.2 that tracks through nested exceptions and reports the ultimate root cause. This should be only a few days away. In the meantime, the -X option does log the full error stack and reveals the syntax error.