mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +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
@@ -100,6 +100,7 @@ var tests = []func(*testing.T, *ent.Client){
|
||||
Sanity,
|
||||
Paging,
|
||||
Charset,
|
||||
Collation,
|
||||
Relation,
|
||||
Predicate,
|
||||
UniqueConstraint,
|
||||
@@ -245,6 +246,15 @@ func Charset(t *testing.T, client *ent.Client) {
|
||||
require.Equal("Nati", f4.Name)
|
||||
}
|
||||
|
||||
func Collation(t *testing.T, client *ent.Client) {
|
||||
require := require.New(t)
|
||||
ctx := context.Background()
|
||||
_ = client.File.Create().SetName("Foo").SaveX(ctx)
|
||||
query := client.File.Query().Where(file.Name("foo"))
|
||||
require.False(query.ExistX(ctx))
|
||||
require.Nil(query.FirstX(ctx))
|
||||
}
|
||||
|
||||
func Predicate(t *testing.T, client *ent.Client) {
|
||||
require := require.New(t)
|
||||
ctx := context.Background()
|
||||
|
||||
Reference in New Issue
Block a user