Add GlobalKeyspace to MoveTablesCreateRequest#322
Merged
Conversation
f48211f to
2715424
Compare
2715424 to
4f7288e
Compare
mscoutermarsh
approved these changes
Jul 8, 2026
Exposes the vtctld MoveTables create --global-keyspace option so that --sharded-auto-increment-handling=REPLACE can auto-create backing sequence tables at switch-traffic --initialize-target-sequences time. Part of planetscale/issues#2032. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
4f7288e to
e5bc79e
Compare
mcrauwel
added a commit
to planetscale/cli
that referenced
this pull request
Jul 9, 2026
Exposes the vtctld MoveTables Create --global-keyspace option so that --sharded-auto-increment-handling=REPLACE can auto-create the backing sequence tables at switch-traffic --initialize-target-sequences time. Part of planetscale/issues#2032. Requires the GlobalKeyspace field from planetscale/planetscale-go#322. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
GlobalKeyspacefield toMoveTablesCreateRequest, exposing the vtctldMoveTables create --global-keyspaceoption on the direct vtctld path.Without it,
--sharded-auto-increment-handling=REPLACEcannot auto-create the backing sequence tables atswitch-traffic --initialize-target-sequencestime — customers have to manually declare each<table>_seqsequence in an unsharded keyspace's vschema before cutover.The server side already supports the parameter; the
pscaleCLI change is a separate follow-up. The managed-workflow surface (WorkflowsService,workflows.go) already has this field — this uses the sameglobal_keyspaceJSON key.Changes
MoveTablesCreateRequest.GlobalKeyspace(json:"global_keyspace,omitempty"), placed next toShardedAutoIncrementHandlingsince the two options work togetherTestMoveTables_Create, and a newTestMoveTables_CreateWithGlobalKeyspaceexercising the field alongsidesharded_auto_increment_handling=REPLACE🤖 Generated with Claude Code