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 client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)
What database are you using (type & version)?
db2 10.5 fp6
What operating system are you using?
What did you do?
(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
Started the process of upgrading flyway from 2.3 to 4.2. However, the initial tests to clean and migrate existing scripts are failing when running truncate. The same scripts have been running successfully for a couple of years under 2.3.
The error indicates that the ddl is not being auto committed in 4.2.
What did you expect to see?
The truncate statement to execute successfully as it does in 2.3.
What did you see instead?
Migration fails at the truncate statement.
Attached is the snippet of debug out from both releases of flyway migrate. Flyway_Issue.txt
The text was updated successfully, but these errors were encountered:
The attachment contains the contents of 3 files which shows each stage of the table set up. Flyway 4.2 fails at file 3 containing the truncate statement at the begging with the following error;
TRUNCATE TABLE "CTP_STATUS" IGNORE DELETE TRIGGERS IMMEDIATE
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0428N The SQL statement is only allowed as the first statement in a unit
of work. SQLSTATE=25001
I can replicate this using the db2 command line by setting the auto-commit option to off.