Fix test for mssql time

This commit is contained in:
Lunny Xiao 2020-02-21 19:20:15 +08:00
parent 92bb9f5e4d
commit 741d90f038
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 3 additions and 1 deletions

View File

@ -96,7 +96,9 @@ func (engine *Engine) CondDeleted(col *core.Column) builder.Cond {
if col.SQLType.IsNumeric() {
cond = builder.Eq{col.Name: 0}
} else {
cond = builder.Eq{col.Name: zeroTime1}
if col.SQLType.IsTime() || engine.dialect.DBType() != core.MSSQL {
cond = builder.Eq{col.Name: zeroTime1}
}
}
if col.Nullable {