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

schemachanger: Support dropping index cascade with dependent inbound FK #97065

Merged

Conversation

Xiang-Gu
Copy link
Contributor

Dropping a unique index cascade will need to drop any inbound FK constraint
if this index is the only uniqueness provider.

This commit enables the declarative schema changer to support this behavior.

Fixes: #96731
Epic: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Dropping an unique index cascade will need to drop any inbound FK
constraint if this index is the only uniqueness provider.
This commit enables the declarative schema changer to support this
behavior.
@Xiang-Gu Xiang-Gu force-pushed the support-drop-index-with-dependent-FK branch from 0b598ad to a53a8d3 Compare February 21, 2023 22:10
@Xiang-Gu Xiang-Gu marked this pull request as ready for review February 21, 2023 23:19
@Xiang-Gu Xiang-Gu requested review from a team February 21, 2023 23:19
@Xiang-Gu Xiang-Gu requested a review from a team as a code owner February 21, 2023 23:19
Copy link
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Xiang-Gu
Copy link
Contributor Author

TFTR!

bors r+

@healthy-pod
Copy link
Contributor

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 22, 2023

Build succeeded:

@craig craig bot merged commit b3231c0 into cockroachdb:master Feb 22, 2023
@Xiang-Gu Xiang-Gu deleted the support-drop-index-with-dependent-FK branch February 22, 2023 23:29
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.

schemachanger: Support DROP INDEX with dependent FK constraint
4 participants