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
@@ -9,7 +9,7 @@ func addAppSettingsMigration(mg *Migrator) {
|
||||
Columns: []*Column{
|
||||
{Name: "id", Type: DB_BigInt, IsPrimaryKey: true, IsAutoIncrement: true},
|
||||
{Name: "org_id", Type: DB_BigInt, Nullable: true},
|
||||
{Name: "plugin_id", Type: DB_NVarchar, Length: 255, Nullable: false},
|
||||
{Name: "plugin_id", Type: DB_NVarchar, Length: 190, Nullable: false},
|
||||
{Name: "enabled", Type: DB_Bool, Nullable: false},
|
||||
{Name: "pinned", Type: DB_Bool, Nullable: false},
|
||||
{Name: "json_data", Type: DB_Text, Nullable: true},
|
||||
@@ -32,4 +32,10 @@ func addAppSettingsMigration(mg *Migrator) {
|
||||
Name: "plugin_version", Type: DB_NVarchar, Nullable: true, Length: 50,
|
||||
}))
|
||||
|
||||
mg.AddMigration("Update plugin_setting table charset", NewTableCharsetMigration("plugin_setting", []*Column{
|
||||
{Name: "plugin_id", Type: DB_NVarchar, Length: 190, Nullable: false},
|
||||
{Name: "json_data", Type: DB_Text, Nullable: true},
|
||||
{Name: "secure_json_data", Type: DB_Text, Nullable: true},
|
||||
{Name: "plugin_version", Type: DB_NVarchar, Nullable: true, Length: 50},
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user