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