Skip to content

Commit

Permalink
Remove the ddl-strategy text box
Browse files Browse the repository at this point in the history
Signed-off-by: Noble Mittal <[email protected]>
  • Loading branch information
beingnoble03 committed Nov 7, 2024
1 parent ddc420a commit 3b0d9f2
Showing 1 changed file with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,16 @@ interface FormData {
const DEFAULT_FORM_DATA: FormData = {
clusterID: '',
keyspace: '',
// Default DDL Strategy set to "direct".
ddlStrategy: 'direct',
// Default DDL Strategy set to "vitess".
// For now, we don't allow other options from VTAdmin.
ddlStrategy: 'vitess',
sql: '',
batchSize: 0,
callerID: '',
migrationContext: '',
uuidList: '',
};

const DDL_STRATEGY_HELP_TEXT = `Online DDL strategy, compatible with @@ddl_strategy session variable (examples: 'gh-ost', 'pt-osc', 'gh-ost --max-load=Threads_running=100'. (default "direct")`;

const MIGRATION_CONTEXT_HELP_TEXT =
'For Online DDL, optionally supply a custom unique string used as context for the migration(s) in this command. By default a unique context is auto-generated by Vitess.';

Expand Down Expand Up @@ -146,7 +145,7 @@ export const CreateSchemaMigration = () => {
<form onSubmit={onSubmit}>
<div className="flex flex-row gap-4 flex-wrap mb-2">
<Select
className="block grow min-w-[300px]"
className="block grow min-w-[300px] max-w-screen-md"
disabled={keyspacesQuery.isLoading || !selectedCluster}
inputClassName="block w-full"
itemToString={(ks) => ks?.keyspace?.name || ''}
Expand All @@ -157,16 +156,6 @@ export const CreateSchemaMigration = () => {
renderItem={(ks) => `${ks?.keyspace?.name}`}
selectedItem={selectedKeyspace}
/>
<Label
className="block grow min-w-[300px]"
label="DDL Strategy"
helpText={DDL_STRATEGY_HELP_TEXT}
>
<TextInput
onChange={(e) => setFormData({ ...formData, ddlStrategy: e.target.value })}
value={formData.ddlStrategy}
/>
</Label>
</div>

<Label label="SQL" helpText={'Semicolon-delimited, repeatable SQL commands to apply.'}>
Expand Down

0 comments on commit 3b0d9f2

Please sign in to comment.