PSQL Error using flyway:latest docker image (2c1fc9102b6a)

I'm running flyway against a PostGIS database using a flyway docker image, and until now have had my script set up to pull flyway:latest from Docker Hub. This morning, the migrations failed with a sql command that appears to be coming from flyway:
ERROR:  syntax error at or near "LIKE" at character 16
STATEMENT:  SHOW VARIABLES LIKE 'version_comment';

This is unexpected, since SHOW VARIABLES is not valid in PSQL and definitely doesn't come from my migration code.

I'm running flyway like this:
docker run --name flyway \
    --network=host \
    -v /Users/me/my_project/db/migrations/sql:/flyway/sql \
    -e FLYWAY_SCHEMAS=api,tiles \
    -e FLYWAY_LOCATIONS=filesystem:/flyway/sql \
    -e FLYWAY_DEFAULT_SCHEMA=flyway \
    -e FLYWAY_USER=postgres \
    -e FLYWAY_PASSWORD=postgres \
    -e FLYWAY_URL=jdbc:postgresql://localhost:5432/my_db \
    -e FLYWAY_BASELINE_VERSION=0 \
    -e FLYWAY_OUT_OF_ORDER=false \
    -e FLYWAY_IGNORE_MIGRATION_PATTERS=*:missing \
    -e FLYWAY_TARGET=latest \
    redgate/flyway \
    migrate

When I pin flyway to 10.7, migrations work as expected, using the exact same sql code and run command.

Is there a change I need to make to my set up going forward?

Best Answer

Answers

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file