|
|
@ -481,7 +481,8 @@ func (engine *Engine) dumpTables(tables []*core.Table, w io.Writer, tp ...core.D |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
cols := table.ColumnsSeq() |
|
|
|
cols := table.ColumnsSeq() |
|
|
|
colNames := dialect.Quote(strings.Join(cols, dialect.Quote(", "))) |
|
|
|
colNames := engine.dialect.Quote(strings.Join(cols, engine.dialect.Quote(", "))) |
|
|
|
|
|
|
|
destColNames := dialect.Quote(strings.Join(cols, dialect.Quote(", "))) |
|
|
|
|
|
|
|
|
|
|
|
rows, err := engine.DB().Query("SELECT " + colNames + " FROM " + engine.Quote(table.Name)) |
|
|
|
rows, err := engine.DB().Query("SELECT " + colNames + " FROM " + engine.Quote(table.Name)) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
@ -496,7 +497,7 @@ func (engine *Engine) dumpTables(tables []*core.Table, w io.Writer, tp ...core.D |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_, err = io.WriteString(w, "INSERT INTO "+dialect.Quote(table.Name)+" ("+colNames+") VALUES (") |
|
|
|
_, err = io.WriteString(w, "INSERT INTO "+dialect.Quote(table.Name)+" ("+destColNames+") VALUES (") |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|