Fix mssql test

This commit is contained in:
Lunny Xiao 2021-08-08 23:54:58 +08:00
parent e702ac5fcf
commit c8799f3a58
1 changed files with 4 additions and 4 deletions

View File

@ -580,12 +580,12 @@ func (engine *Engine) dumpTables(ctx context.Context, tables []*schemas.Table, w
return err
}
} else {
if stp.IsNumeric() {
if _, err = io.WriteString(w, s.String); err != nil {
if stp.IsBool() || (dstDialect.URI().DBType == schemas.MSSQL && strings.EqualFold(stp.Name, schemas.Bit)) {
if _, err = io.WriteString(w, formatBool(s.String, dstDialect)); err != nil {
return err
}
} else if stp.IsBool() || (dstDialect.URI().DBType == schemas.MSSQL && stp.Name == schemas.Bit) {
if _, err = io.WriteString(w, formatBool(s.String, dstDialect)); err != nil {
} else if stp.IsNumeric() {
if _, err = io.WriteString(w, s.String); err != nil {
return err
}
} else if sess.engine.dialect.URI().DBType == schemas.DAMENG && stp.IsTime() && len(s.String) == 25 {