Fix code
This commit is contained in:
parent
747a357ea9
commit
6f9df57c50
|
@ -18,10 +18,7 @@ func FormatColumnTime(dialect Dialect, dbLocation *time.Location, col *schemas.C
|
||||||
if col.Nullable {
|
if col.Nullable {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
if col.SQLType.IsNumeric() {
|
if col.SQLType.IsNumeric() || col.SQLType.Name == schemas.TimeStamp || col.SQLType.Name == schemas.TimeStampz {
|
||||||
return 0, nil
|
|
||||||
}
|
|
||||||
if col.SQLType.Name == schemas.TimeStamp || col.SQLType.Name == schemas.TimeStampz {
|
|
||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -704,9 +704,7 @@ func (statement *Statement) CondDeleted(col *schemas.Column) builder.Cond {
|
||||||
colName = statement.quote(prefix) + "." + statement.quote(col.Name)
|
colName = statement.quote(prefix) + "." + statement.quote(col.Name)
|
||||||
}
|
}
|
||||||
cond := builder.NewCond()
|
cond := builder.NewCond()
|
||||||
if col.SQLType.IsNumeric() {
|
if col.SQLType.IsNumeric() || col.SQLType.Name == schemas.TimeStamp || col.SQLType.Name == schemas.TimeStampz {
|
||||||
cond = builder.Eq{colName: 0}
|
|
||||||
} else if col.SQLType.Name == schemas.TimeStamp || col.SQLType.Name == schemas.TimeStampz {
|
|
||||||
cond = builder.Eq{colName: 0}
|
cond = builder.Eq{colName: 0}
|
||||||
} else {
|
} else {
|
||||||
cond = builder.Eq{colName: utils.ZeroTime1}
|
cond = builder.Eq{colName: utils.ZeroTime1}
|
||||||
|
|
Loading…
Reference in New Issue