cockroach
cockroach copied to clipboard
scbuildstmt: add secondary index support for ALTER PK
scbuildstmt: add secondary index support for ALTER PK
Previously, we had limited support for ALTER PRIMARY KEY statements in
the declarative schema changer. One of the limitations was that
secondary indexes were not supported. This commit removes this limitation.
Relates to #83932.
Release note (sql change): declarative schema changer support for ALTER
PRIMARY KEY statements now extends to tables which have secondary
indexes.
cc @ajwerner @ajstorm: this is a work-in-progress to validate that indeed, making ALTER PRIMARY KEY support secondary indexes (and hence UNIQUEs) isn't that big of a deal. So far, it's looking good. My goal is to get tests to pass, then spin off various smaller commits, many of which are straight up bug fixes which don't need to wait for the end of stability period.
I'm going to work on this on a more leisurely pace now, since it's not needed for DMS. This is basically blocked on https://github.com/cockroachdb/cockroach/pull/86326 at this point, and the release branch cut of course.
This is now ready for review.
Though I don’t see what were the comment bugs and how they were fixed.
Thanks for taking a look!
Though I don’t see what were the comment bugs and how they were fixed.
This PR originally had two commits, the first was merged into master and release-22.2 about a month ago, the comment bug fixes were in there. The PR description is super stale now, I'll update it. Sorry for the confusion.
Thanks for the reviews! I'm going to merge this now, I don't think it will interfere any more with any known or upcoming release/GA blockers.
bors r+