DB2 truncate statement fails under Flyway 4.2.0 #1817
What version of Flyway are you using?
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.
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
I can replicate this using the db2 command line by setting the auto-commit option to off.