|
85 | 85 |
|
86 | 86 | schemaFlags schemaFlags |
87 | 87 |
|
88 | | - dataPackNewTables bool |
| 88 | + dataPackNewTables bool |
| 89 | + disablePlanValidation bool |
89 | 90 |
|
90 | 91 | statementTimeoutModifiers []string |
91 | 92 | lockTimeoutModifiers []string |
@@ -124,6 +125,8 @@ func createPlanFlags(cmd *cobra.Command) *planFlags { |
124 | 125 | schemaFlagsVar(cmd, &flags.schemaFlags) |
125 | 126 |
|
126 | 127 | cmd.Flags().BoolVar(&flags.dataPackNewTables, "data-pack-new-tables", true, "If set, will data pack new tables in the plan to minimize table size (re-arranges columns).") |
| 128 | + cmd.Flags().BoolVar(&flags.disablePlanValidation, "disable-plan-validation", false, "If set, will disable plan validation. Plan validation runs the migration against a temporary"+ |
| 129 | + "database with an identical schema to the original, asserting that the generated plan actually migrates the schema to the desired target.") |
127 | 130 |
|
128 | 131 | timeoutModifierFlagVar(cmd, &flags.statementTimeoutModifiers, "statement", "t") |
129 | 132 | timeoutModifierFlagVar(cmd, &flags.lockTimeoutModifiers, "lock", "l") |
@@ -178,6 +181,9 @@ func parsePlanConfig(p planFlags) (planConfig, error) { |
178 | 181 | if p.dataPackNewTables { |
179 | 182 | opts = append(opts, diff.WithDataPackNewTables()) |
180 | 183 | } |
| 184 | + if p.disablePlanValidation { |
| 185 | + opts = append(opts, diff.WithDoNotValidatePlan()) |
| 186 | + } |
181 | 187 |
|
182 | 188 | var statementTimeoutModifiers []timeoutModifier |
183 | 189 | for _, s := range p.statementTimeoutModifiers { |
|
0 commit comments