Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flyway 6.x not able to create flyway_schema_history in Sybase ASE #2605

Closed
bjornhilstad opened this issue Dec 18, 2019 · 2 comments
Closed

Comments

@bjornhilstad
Copy link

Which version and edition of Flyway are you using?

6.0.8

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)
Yes, also fails same way with 6.1.2

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Gradle plugin

Which database are you using (type & version)?

Sybase ASE 16.0

Which operating system are you using?

Windows

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.)
Upgraded my spring-boot app from 2.1.10 to 2.2.2 which in turn upgraded flyway from 5.2.4 to 6.0.8. This causes flyway to fail towards the database when it tries to create the flyway_schema_history-table. The database error message says this "The 'CREATE TABLE' command is not allowed within a multi-statement transaction".
Switching just flyway back to 5.2.4 it still works just fine. Flyway 6.0.0 also fails the same way.
The problem seems to be that my database does not allow what flyway tries to do because it probably has the option 'ddl in tran' set to false (I have not tested changing this because I don't have the rights to do so).
When creating the flyway_schema_history-table it seems that it also adds the command " lock datarows on 'default' " which might make it a multi-statement transaction. This could be what changed from version 6?
I assume that adding the lock datarows command was done for some reason, but it might be nice if it was configurable (if that is what is causing the issue).

What did you expect to see?

I was expecting flyway to still be able to create its own table.

What did you see instead?

Error message described above.

@MikielAgutu
Copy link

I've been able to reproduce this. As you said, it's related to Flyway's use of transactions when creating the schema history table, and the ddl in tran setting. We have an idea for a fix, but it'll require a fair bit of work. We're unlikely to fix it for next patch release (v6.1.3). We'll keep this issue updated.

@MikielAgutu MikielAgutu added this to the Flyway 6.x milestone Dec 19, 2019
@MikielAgutu MikielAgutu modified the milestones: Flyway 6.x, Flyway 6.3 Feb 11, 2020
@MikielAgutu
Copy link

This one was pretty difficult to solve 🔨 It should be fixed for the next release (6.3). Let us know if it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants