Skip to content

Commit

Permalink
优化导出sql文件
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Dec 28, 2020
1 parent ef9365c commit 4c55a8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (mysql *Mysql) DumpSql(filePath string) error {
defer file.Close()
writer := bufio.NewWriter(file)
writer.WriteString("DROP TABLE IF EXISTS users;")
writer.WriteString(createTableSql + "\n")
writer.WriteString(createTableSql)
db := mysql.GetDB()
userList, err := queryUserList(db, "SELECT * FROM users;")
if err != nil {
Expand Down

0 comments on commit 4c55a8d

Please sign in to comment.