mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
set default mysql table collation to utf8mb4_bin (#1295)
Summary: Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1295 Pull Request resolved: https://github.com/facebookincubator/ent/pull/13 See [Case Sensitivity in String Searches](https://dev.mysql.com/doc/refman/5.7/en/case-sensitivity.html) Reviewed By: a8m Differential Revision: D16782072 fbshipit-source-id: f2a836e580757f0e956a444c3fdf93c502723098
This commit is contained in:
committed by
Facebook Github Bot
parent
108affa8dd
commit
c0deedcf48
@@ -77,9 +77,9 @@ func (t *Table) MySQL(version string) *sql.TableBuilder {
|
||||
for _, pk := range t.PrimaryKey {
|
||||
b.PrimaryKey(pk.Name)
|
||||
}
|
||||
// default character set to MySQL table.
|
||||
// columns can be override using the "Charset" field.
|
||||
b.Charset("utf8mb4")
|
||||
// default charset / collation on MySQL table.
|
||||
// columns can be override using the Charset / Collate fields.
|
||||
b.Charset("utf8mb4").Collate("utf8mb4_bin")
|
||||
return b
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user