check for empty charset
This commit is contained in:
parent
fdb300db20
commit
d3d1b7ce9a
|
@ -146,11 +146,13 @@ func (b *Base) CreateTableSql(table *Table, tableName, storeEngine, charset stri
|
|||
sql += " ENGINE=" + storeEngine
|
||||
}
|
||||
if b.dialect.SupportCharset() {
|
||||
if charset == "" {
|
||||
if len(charset) == 0 {
|
||||
charset = b.dialect.URI().Charset
|
||||
}
|
||||
if len(charset) > 0 {
|
||||
sql += " DEFAULT CHARSET " + charset
|
||||
}
|
||||
}
|
||||
sql += ";"
|
||||
return sql
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue