#3904·flyway

flyway migrate hangs indefinitely when using DECLARE

Author: kundan-gitCreated May 29, 2024Updated Sep 23, 2026
Labelss: needs investigation
Which version and edition of Flyway are you using?

Flyway OSS Edition 10.13.0 by Redgate

See release notes here: https://rd.gt/416ObMi

Plugin Name Version
OceanBase 10.12.0
TiDB 10.12.0
YugabyteDB 10.12.0
Apache Ignite 10.12.0
ClickHouse 10.12.0
If this is not the latest version, can you reproduce the issue with the latest one as well? (Many bugs are fixed in newer releases and upgrading will often resolve the issue)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Command-line

Which database are you using? (Type & version)

Snowflake

Which operating system are you using?

Mac

What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)

CREATE OR REPLACE TASK MY_TASK SCHEDULE = '240 MINUTE' WAREHOUSE = 'mywh' WHEN SYSTEM$STREAM_HAS_DATA('my_stream') AS BEGIN BEGIN TRANSACTION; DECLARE test_string STRING; END; COMMIT;

What did you expect to see?

flyway migrate -X to create this task

What did you see instead?

It hangs forever, renaming DECLARE to DECLARE1 helps breaking out of hang

Seems related to https://github.com/flyway/flyway/issues/3702