Skip to content

Commit

Permalink
ALTERs
Browse files Browse the repository at this point in the history
  • Loading branch information
makalaaneesh committed Dec 30, 2024
1 parent fa542b7 commit 04ac43a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions yb-voyager/src/tgtdb/yugabytedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ func (yb *TargetYugabyteDB) CreateVoyagerSchema() error {
rows_imported BIGINT,
PRIMARY KEY (migration_uuid, data_file_name, batch_number, schema_name, table_name)
);`, BATCH_METADATA_TABLE_NAME),
fmt.Sprintf(`ALTER TABLE %s ALTER COLUMN data_file_name TYPE TEXT;`, BATCH_METADATA_TABLE_NAME),
fmt.Sprintf(`ALTER TABLE %s ALTER COLUMN schema_name TYPE TEXT;`, BATCH_METADATA_TABLE_NAME),
fmt.Sprintf(`ALTER TABLE %s ALTER COLUMN table_name TYPE TEXT;`, BATCH_METADATA_TABLE_NAME),
fmt.Sprintf(`CREATE TABLE IF NOT EXISTS %s (
migration_uuid uuid,
channel_no INT,
Expand All @@ -360,6 +363,7 @@ func (yb *TargetYugabyteDB) CreateVoyagerSchema() error {
num_deletes BIGINT,
num_updates BIGINT,
PRIMARY KEY (migration_uuid, table_name, channel_no));`, EVENTS_PER_TABLE_METADATA_TABLE_NAME),
fmt.Sprintf(`ALTER TABLE %s ALTER COLUMN table_name TYPE TEXT;`, EVENTS_PER_TABLE_METADATA_TABLE_NAME),
}

maxAttempts := 12
Expand Down

0 comments on commit 04ac43a

Please sign in to comment.