Skip to content

Commit

Permalink
sort and connect
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Jan 24, 2024
1 parent 2ba1ca8 commit 2473c62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions up.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ func UpBySteps(ctx context.Context, db *DB, m *Migration, steps int, callbacks .
func Upgrade(ctx context.Context, db *DB, migrations MigrationSlice) error {
migrationMap := migrations.MapByPackage()
for _, pkgMigrations := range migrationMap {
pkgMigrations = pkgMigrations.Sort().Connect()

_, lastAppliedMigration, err := db.FindLastAppliedMigration(ctx, pkgMigrations)
if err != nil {
return err
Expand Down

0 comments on commit 2473c62

Please sign in to comment.