fix db default charset error (#1072)
* fix db default charset error * add table charset empty check
This commit is contained in:
parent
5b080b7495
commit
4e21af9122
|
@ -551,10 +551,13 @@ func (db *mysql) CreateTableSql(table *core.Table, tableName, storeEngine, chars
|
|||
|
||||
if len(charset) == 0 {
|
||||
charset = db.URI().Charset
|
||||
} else if len(charset) > 0 {
|
||||
}
|
||||
if len(charset) != 0 {
|
||||
sql += " DEFAULT CHARSET " + charset
|
||||
}
|
||||
|
||||
|
||||
|
||||
if db.rowFormat != "" {
|
||||
sql += " ROW_FORMAT=" + db.rowFormat
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue