Skip to content

Commit

Permalink
Self review part deux
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Apr 8, 2024
1 parent ee98e09 commit 28b80a9
Show file tree
Hide file tree
Showing 7 changed files with 2,062 additions and 2,057 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func registerCommands(root *cobra.Command) {
create.Flags().BoolVar(&createOptions.AtomicCopy, "atomic-copy", false, "(EXPERIMENTAL) A single copy phase is run for all tables from the source. Use this, for example, if your source keyspace has tables which use foreign key constraints.")
create.Flags().StringVar(&createOptions.WorkflowOptions.TenantId, "tenant-id", "", "(EXPERIMENTAL) The tenant ID to use for the MoveTables workflow into a multi-tenant keyspace.")
create.Flags().StringVar(&createOptions.WorkflowOptions.SourceKeyspaceAlias, "source-keyspace-alias", "", "(EXPERIMENTAL) Used currently only for multi-tenant migrations. This value will be used instead of the source keyspace name in the keyspace routing rules.")
create.Flags().BoolVar(&createOptions.WorkflowOptions.StripAutoIncrement, "strip-auto-increment", true, "If moving the table(s) to a sharded keyspace, remove any auto_increment clauses when copying the schema to the target as sharded keyspaces should rely on either user/application generated keys or Vitess sequences to ensure uniqueness.")
create.Flags().BoolVar(&createOptions.WorkflowOptions.StripShardedAutoIncrement, "remove-sharded-auto-increment", true, "If moving the table(s) to a sharded keyspace, remove any auto_increment clauses when copying the schema to the target as sharded keyspaces should rely on either user/application generated keys or Vitess sequences to ensure uniqueness.")
base.AddCommand(create)

opts := &common.SubCommandsOpts{
Expand Down
4,057 changes: 2,030 additions & 2,027 deletions go/vt/proto/vtctldata/vtctldata.pb.go

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions go/vt/proto/vtctldata/vtctldata_vtproto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/vt/vtctl/workflow/materializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ func (mz *materializer) deploySchema() error {
removeAutoInc := false
if mz.workflowType == binlogdatapb.VReplicationWorkflowType_MoveTables &&
(mz.targetVSchema != nil && mz.targetVSchema.Keyspace != nil && mz.targetVSchema.Keyspace.Sharded) &&
(mz.ms != nil && mz.ms.GetWorkflowOptions().GetStripAutoIncrement()) {
(mz.ms != nil && mz.ms.GetWorkflowOptions().GetStripShardedAutoIncrement()) {
removeAutoInc = true
}

Expand Down
4 changes: 3 additions & 1 deletion proto/vtctldata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ message Shard {
message WorkflowOptions {
string tenant_id = 1;
string source_keyspace_alias = 2;
bool strip_auto_increment = 3;
// Remove auto_increment clauses on tables when moving them to a sharded
// keyspace.
bool strip_sharded_auto_increment = 3;
}

// TODO: comment the hell out of this.
Expand Down
8 changes: 4 additions & 4 deletions web/vtadmin/src/proto/vtadmin.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions web/vtadmin/src/proto/vtadmin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 28b80a9

Please sign in to comment.