Skip to content

Dropping an index requires callers to provide its name#6633

Merged
labkey-adam merged 11 commits into
developfrom
fb_drop_indices_by_name
May 9, 2025
Merged

Dropping an index requires callers to provide its name#6633
labkey-adam merged 11 commits into
developfrom
fb_drop_indices_by_name

Conversation

@labkey-adam
Copy link
Copy Markdown
Contributor

@labkey-adam labkey-adam commented May 6, 2025

Rationale

Stop guessing index names (step 1). This change eliminates the ChangeType.DropIndices option, which guessed the index name based on table and column names, leaving DropIndicesByName as the only option. It also adds StorageProvisioner.dropIndices() to drop indices by name and adjusts AbstractAuditTypeProvider to use this method.

Unfortunately, this does not eliminate all index name guessing: Admin-requested indexes (via metadata XML and domain save API) still create diffs using index names; we need to update this code path to use the audit provider app. Also, the SQL Server dialect still guesses names when updating the data type of a column that's part of an index. But this change is a step in the right direction.

https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=52913

Comment thread api/src/org/labkey/api/data/dialect/PostgreSql91Dialect.java Outdated
Comment thread api/src/org/labkey/api/data/dialect/PostgreSql91Dialect.java
@labkey-adam labkey-adam merged commit 2997e2b into develop May 9, 2025
9 checks passed
@labkey-adam labkey-adam deleted the fb_drop_indices_by_name branch May 9, 2025 01:05
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.

2 participants