diff --git a/engine.go b/engine.go index 99c6c702..adf7a57b 100644 --- a/engine.go +++ b/engine.go @@ -448,6 +448,21 @@ func formatColumnValue(dstDialect dialects.Dialect, d interface{}, col *schemas. return "NULL" } + if dstDialect.URI().DBType == schemas.SQLITE || dstDialect.URI().DBType == schemas.MSSQL { + if dq, ok := d.(bool); ok { + if dq { + return "1" + } + return "0" + } + if val, ok := d.(reflect.Value); ok && val.Kind() == reflect.Bool { + if val.Bool() { + return "1" + } + return "0" + } + } + if dq, ok := d.(bool); ok && (dstDialect.URI().DBType == schemas.SQLITE || dstDialect.URI().DBType == schemas.MSSQL) { if dq { @@ -601,6 +616,8 @@ func (engine *Engine) dumpTables(tables []*schemas.Table, w io.Writer, tp ...sch } defer rows.Close() + fmt.Fprintf(os.Stdout, "%s: table.Type: %T\n", dstTableName, table.Type) + if table.Type != nil { val := reflect.New(table.Type) for rows.Next() {