Skip to content

Commit

Permalink
Manually cherry pick 578eeb8
Browse files Browse the repository at this point in the history
  • Loading branch information
jackc committed Aug 13, 2022
1 parent e670788 commit 54e00e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion migrate/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,12 @@ func FindMigrations(fsys fs.FS) ([]string, error) {
return nil, fmt.Errorf("Duplicate migration %d", n)
}

// Set at specific index, so that paths are properly sorted
paths = setAt(paths, fi.Name(), n-1)
foundMigrations[n-1] = true
}

for i, _ := range paths {
for i := range paths {
if !foundMigrations[i] {
return nil, fmt.Errorf("Missing migration %d", i+1)
}
Expand Down

0 comments on commit 54e00e2

Please sign in to comment.