You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which version and edition of Flyway are you using?
6.2.3 Community
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)
Works fine in 6.2.2
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Java API
Which database are you using (type & version)?
MySQL/Aurora (MySQL in dev/Aurora in staging, both have issue)
Which operating system are you using?
macOS Catalina in dev, Alpine in staging - both have issue
What did you do?
(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
Trying to run a migration with CREATE TABLE IF EXISTS statement
What did you expect to see?
Expected table to be created
What did you see instead?
Exception thrown when running migrations: org.flywaydb.core.api.FlywayException: Unable to parse statement in db/migration/...sql at line 1 col 1: Incomplete statement at line 1 col 1: CREATE TABLE IF NOT EXISTS
The text was updated successfully, but these errors were encountered:
Another example that fails with 6.2.3, works with 6.2.2 and with mysql client/cli.
State: HY000 - Error Code: 1681)
ERROR: Unable to parse statement in db/flyway/sql/V005__add_adjacency_team.sql at line 9 col 1: Incomplete statement at line 9 col 1: set @query = IF(@exist <= 0,
'ALTER TABLE `teams` ADD COLUMN `parent_team_id` int(10) unsigned DEFAULT NULL AFTER `type`;',
'select \'Column Exists\' status');
prepare stmt from @query;
EXECUTE stmt;
Full script is :
SELECT count(*)
INTO @exist
FROM information_schema.columns
WHERE table_schema = database()
and COLUMN_NAME = 'parent_team_id'
AND table_name = 'teams';
set @query = IF(@exist <= 0,
'ALTER TABLE `teams` ADD COLUMN `parent_team_id` int(10) unsigned DEFAULT NULL AFTER `type`;',
'select \'Column Exists\' status');
prepare stmt from @query;
EXECUTE stmt;
Which version and edition of Flyway are you using?
6.2.3 Community
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)
Works fine in 6.2.2
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Java API
Which database are you using (type & version)?
MySQL/Aurora (MySQL in dev/Aurora in staging, both have issue)
Which operating system are you using?
macOS Catalina in dev, Alpine in staging - both have issue
What did you do?
(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
Trying to run a migration with
CREATE TABLE IF EXISTS
statementWhat did you expect to see?
Expected table to be created
What did you see instead?
Exception thrown when running migrations:
org.flywaydb.core.api.FlywayException: Unable to parse statement in db/migration/...sql at line 1 col 1: Incomplete statement at line 1 col 1: CREATE TABLE IF NOT EXISTS
The text was updated successfully, but these errors were encountered: