Skip to content

Commit 5f15f8a

Browse files
committed
Remove not needed call by grouping columnLists
There is no need to call `applyColumnTypes` more than once for the same `databaseName` and `tableName`, it is just move the additional `columnList` to the first call.
1 parent dfc8aa2 commit 5f15f8a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

go/logic/inspect.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,7 @@ func (this *Inspector) inspectOriginalAndGhostTables() (err error) {
173173
// This additional step looks at which columns are unsigned. We could have merged this within
174174
// the `getTableColumns()` function, but it's a later patch and introduces some complexity; I feel
175175
// comfortable in doing this as a separate step.
176-
this.applyColumnTypes(this.migrationContext.DatabaseName, this.migrationContext.OriginalTableName, this.migrationContext.OriginalTableColumns, this.migrationContext.SharedColumns)
177-
this.applyColumnTypes(this.migrationContext.DatabaseName, this.migrationContext.OriginalTableName, &this.migrationContext.UniqueKey.Columns)
176+
this.applyColumnTypes(this.migrationContext.DatabaseName, this.migrationContext.OriginalTableName, this.migrationContext.OriginalTableColumns, this.migrationContext.SharedColumns, &this.migrationContext.UniqueKey.Columns)
178177
this.applyColumnTypes(this.migrationContext.DatabaseName, this.migrationContext.GetGhostTableName(), this.migrationContext.GhostTableColumns, this.migrationContext.MappedSharedColumns)
179178

180179
for i := range this.migrationContext.SharedColumns.Columns() {

0 commit comments

Comments
 (0)