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

fix: EXPOSED-698 fix dropIndex for Oracle and H2 Dialects #2399

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Avi18971911
Copy link

@Avi18971911 Avi18971911 commented Feb 9, 2025

Description

Summary of the change: Changed the Oracle and H2 dropIndex implementations to successfully execute for both unique and non-unique indices.

Detailed description:

  • What: Oracle and H2 dropIndex implementations changed to work for both unique and non-unique indices.
  • Why: As described in the ticket, the Oracle and H2 implementations could not actually successfully execute with non-unique indices. This can be verified by executing the added unit tests without the code changes.
  • How: Now the Oracle and H2 implementations check whether the index is unique. If it is unique, it uses the DROP CONSTRAINT keywords, and if it isn't, it uses the DROP INDEX keywords. However, the nature of the metadata has not been touched, so the constraint and index names must be exactly the same, which is true in the unit tests, but may not always true in practice.

Type of Change

Please mark the relevant options with an "X":

  • Bug fix
  • New feature
  • Documentation update

Updates/remove existing public API methods: OracleDialect and H2 dropIndex function

  • Is breaking change

Affected databases:

  • MariaDB
  • Mysql5
  • Mysql8
  • Oracle
  • Postgres
  • SqlServer
  • H2
  • SQLite

Checklist

  • Unit tests are in place
  • The build is green (including the Detekt check)
  • All public methods affected by my PR has up to date API docs
  • Documentation for my change is up to date

Related Issues

@Avi18971911 Avi18971911 marked this pull request as ready for review February 9, 2025 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant