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:
Dan Cech
2017-03-28 14:34:53 +02:00
committed by Torkel Ödegaard
parent e91a078105
commit 24d4e50343
19 changed files with 198 additions and 22 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ func getEngine() (*xorm.Engine, error) {
protocol = "unix"
}
cnnstr = fmt.Sprintf("%s:%s@%s(%s)/%s?charset=utf8",
cnnstr = fmt.Sprintf("%s:%s@%s(%s)/%s?charset=utf8mb4",
DbCfg.User, DbCfg.Pwd, protocol, DbCfg.Host, DbCfg.Name)
if DbCfg.SslMode == "true" || DbCfg.SslMode == "skip-verify" {