This commit is contained in:
Lunny Xiao 2023-07-01 08:31:14 +08:00
parent 6f4d0d8284
commit 137c075d4b
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 4 additions and 1 deletions

View File

@ -578,7 +578,7 @@ func TestCollate(t *testing.T) {
UserId: 1,
Name: "Test",
})
if testEngine.Dialect().URI().DBType == schemas.MYSQL || testEngine.Dialect().URI().DBType == schemas.MSSQL {
if testEngine.Dialect().URI().DBType == schemas.MYSQL {
ver, err1 := testEngine.DBVersion()
assert.NoError(t, err1)
fmt.Println("====", ver.Edition)
@ -586,6 +586,7 @@ func TestCollate(t *testing.T) {
assert.NoError(t, err1)
for _, table := range tables {
if table.Name == "test_collate_column" {
fmt.Println("21222", table.Collation)
if table.Collation == "utf8mb4_general_ci" {
assert.Error(t, err)
} else {
@ -593,6 +594,8 @@ func TestCollate(t *testing.T) {
}
}
}
} else if testEngine.Dialect().URI().DBType == schemas.MSSQL {
assert.Error(t, err)
} else {
assert.NoError(t, err)
}