apply EnumValues to mapped column
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
This commit is contained in:
parent
e80ddb42c9
commit
6e5b665c55
@ -189,6 +189,7 @@ func (this *Inspector) inspectOriginalAndGhostTables() (err error) {
|
|||||||
}
|
}
|
||||||
if column.Name == mappedColumn.Name && column.Type == sql.EnumColumnType && mappedColumn.Charset != "" {
|
if column.Name == mappedColumn.Name && column.Type == sql.EnumColumnType && mappedColumn.Charset != "" {
|
||||||
this.migrationContext.MappedSharedColumns.SetEnumToTextConversion(column.Name)
|
this.migrationContext.MappedSharedColumns.SetEnumToTextConversion(column.Name)
|
||||||
|
this.migrationContext.MappedSharedColumns.SetEnumValues(column.Name, column.EnumValues)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,6 +189,10 @@ func (this *ColumnList) IsEnumToTextConversion(columnName string) bool {
|
|||||||
return this.GetColumn(columnName).enumToTextConversion
|
return this.GetColumn(columnName).enumToTextConversion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *ColumnList) SetEnumValues(columnName string, enumValues string) {
|
||||||
|
this.GetColumn(columnName).EnumValues = enumValues
|
||||||
|
|
||||||
|
|
||||||
func (this *ColumnList) String() string {
|
func (this *ColumnList) String() string {
|
||||||
return strings.Join(this.Names(), ",")
|
return strings.Join(this.Names(), ",")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user