Skip to content

Commit

Permalink
remove accidental shadowing of i in (*MigrateCmd).run
Browse files Browse the repository at this point in the history
hopefully fixes #6
  • Loading branch information
bokwoon95 committed Mar 29, 2024
1 parent 9a583d2 commit 08cbf75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ddl/migrate_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,9 @@ func (cmd *MigrateCmd) run(conn *sql.Conn, migrations []migration) (stoppedAt in
Columns: []string{"filename", "checksum", "started_at", "time_taken_ns", "success"},
KeyColumns: []string{"filename"},
}
i := 0
j := 0
_, err = bi.ExecContext(cmd.Ctx, db, func(row []any) error {
if i > 0 {
if j > 0 {
return io.EOF
}
row[0] = m.filename
Expand All @@ -551,7 +551,7 @@ func (cmd *MigrateCmd) run(conn *sql.Conn, migrations []migration) (stoppedAt in
}
row[3] = m.timeTakenNs
row[4] = m.success
i++
j++
return nil
})
if err != nil {
Expand Down

0 comments on commit 08cbf75

Please sign in to comment.