Fix sqlite dump
This commit is contained in:
parent
6becb291d3
commit
41634f24e7
|
@ -542,11 +542,19 @@ func (engine *Engine) dumpTables(tables []*schemas.Table, w io.Writer, tp ...sch
|
||||||
} else {
|
} else {
|
||||||
temp += fmt.Sprintf(", '%s'", s)
|
temp += fmt.Sprintf(", '%s'", s)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if dq, ok := d.(bool); ok && dstDialect.URI().DBType == schemas.SQLITE {
|
||||||
|
if dq {
|
||||||
|
temp += ", 1"
|
||||||
|
} else {
|
||||||
|
temp += ", 0"
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
temp += fmt.Sprintf(", %s", s)
|
temp += fmt.Sprintf(", %s", s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
_, err = io.WriteString(w, temp[2:]+");\n")
|
_, err = io.WriteString(w, temp[2:]+");\n")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue