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 upgrade from 3.2.1 to 4.0 fails with Oracle error ORA-00955: name is already used by an existing object #1235
Comments
Same issue. Cannot be upgraded safely. |
Same here. We're trying to upgrade from 3.2.1 to 4.0 on Oracle 11.2.0.4. |
Fixed |
Hello Axel, I don't see any code commit referencing this issue. |
The change d18f67f#diff-9f5e725829945ed3f57ccca26d54cb1f does not solve the issue. I created PR #1290 with the modifications @kevin-wimmer suggested. |
@axelfontaine Could you review #1290 when you have a chance ? |
This change contains two modifications: * delete the name of the PK to be dropped, because it is not valid SQL (see https://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_3001.htm#i2104014) * implement the only working solution for #1235, which was initially suggested by @kevin-wimmer - using the DROP INDEX clause
What version of Flyway are you using?
3.2.1
What database are you using (type & version)?
Oracle 11g (11.2.0.1.0)
What operating system are you using?
Windows 7 SP1
What did you do?
After replacing flyway-core-3.2.1.jar with flyway-core-4.0.jar and redeploying my application, Flyway attempts to upgrade the "schema_version" table, but fails with the following Oracle error:
At issue is the fact that the upgrade script removes the old PK constraint using the following statement:
While this does remove the PK constraint, it does not always remove the implicit index created with the same name. As a result, the upgrade script fails when attempting to create a new constraint with the name "schema_version_pk". Replacing the above statement with the one below in the Oracle upgrade script resolves this issue:
What did you expect to see?
I expected to see the flyway "schema_version" table successfully upgraded.
What did you see instead?
The text was updated successfully, but these errors were encountered: