We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 45e4f1e + e428ece commit 04b36ebCopy full SHA for 04b36eb
database/mysql/mysql.go
@@ -361,7 +361,7 @@ func (m *Mysql) SetVersion(version int, dirty bool) error {
361
return &database.Error{OrigErr: err, Err: "transaction start failed"}
362
}
363
364
- query := "DELETE FROM `" + m.config.MigrationsTable + "`"
+ query := "DELETE FROM `" + m.config.MigrationsTable + "` LIMIT 1"
365
if _, err := tx.ExecContext(context.Background(), query); err != nil {
366
if errRollback := tx.Rollback(); errRollback != nil {
367
err = multierror.Append(err, errRollback)
0 commit comments