utf8mb4 encoding (#7959)
* use utf8mb4 character set for connections to mysql * use utf8mb4 character set for tables, shorten varchar fields used in unique indexes * migration type to update table character set * update table character sets * set charset for temp_user.status * gofmt
This commit is contained in:
committed by
Torkel Ödegaard
parent
e91a078105
commit
24d4e50343
@@ -200,3 +200,17 @@ func (m *CopyTableDataMigration) IfTableExists(tableName string) *CopyTableDataM
|
||||
func (m *CopyTableDataMigration) Sql(d Dialect) string {
|
||||
return d.CopyTableData(m.sourceTable, m.targetTable, m.sourceCols, m.targetCols)
|
||||
}
|
||||
|
||||
type TableCharsetMigration struct {
|
||||
MigrationBase
|
||||
tableName string
|
||||
columns []*Column
|
||||
}
|
||||
|
||||
func NewTableCharsetMigration(tableName string, columns []*Column) *TableCharsetMigration {
|
||||
return &TableCharsetMigration{tableName: tableName, columns: columns}
|
||||
}
|
||||
|
||||
func (m *TableCharsetMigration) Sql(d Dialect) string {
|
||||
return d.UpdateTableSql(m.tableName, m.columns)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user