-
Notifications
You must be signed in to change notification settings - Fork 157
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
Existing primary keys and foreign keys are dropped and recreated again #718
Comments
@filipelautert following up our conversation in #436 (comment) the linked PR solves the remaining issues that we were having when creating a diff between the existing Schema in an Oracle Database and the JPA Entities in our project. Thank you for your work in that pr, without it I would probably not have been able to find and solve the issue. |
@Guschtel thanks! I'm coming back from PTO and will try to review your 2 prs still this week. |
@filipelautert no rush. We've been using our locally patched version of the code for a few weeks now. So far, it looks good for our usecases. |
Removes validate differences when comparing an Oracle Database Schema against a Spring Jpa / HibernateDatabase, fixes liquibase#718
Environment
Liquibase Version: 4.29.2
Liquibase Integration & Version: Gradle
Liquibase Extension(s) & Version: org.liquibase.ext:liquibase-hibernate6:4.29.2
Database Vendor & Version: Oracle / H2
Operating System Type & Version: Windows
Infrastructure Type/Provider: local desktop
Description
When creating a liquibase changelog between JPA Entities and an Oracle database, the generated diff-changelog contains changeset entries that drop existing unique indexes and primary keys and recreates them the exact same way, even though there should be no such changes.
Steps To Reproduce
Create a JPA Entity with the corresponding annotations, for example:
Then run the diff command and see that the changes contains a lot of differences, of which only some are expected, for example:
Then run the diff-changelog command and no changesets are generated at all.
This is fixed in #717
When applying this fix, run the diff-changelog and then you will get diff-changelog changesets that contain unnecessary alter table statements similar to the following examples:
and
(The examples given here are from different runs)
Expected/Desired Behavior
No unnecessary alter table statements are created
Additional Context
Related issues:
The text was updated successfully, but these errors were encountered: