Skip to content

Commit 1aa4565

Browse files
committed
Join 2 subsequent ifs into one
1 parent a8bcd23 commit 1aa4565

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

migrate.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,8 @@ func ToCatchup(migrations, existingMigrations []*Migration, lastRun *Migration)
395395
break
396396
}
397397
}
398-
if !found {
399-
if migration.Less(lastRun) {
400-
missing = append(missing, &PlannedMigration{Migration: migration, Queries: migration.Up})
401-
}
398+
if !found && migration.Less(lastRun) {
399+
missing = append(missing, &PlannedMigration{Migration: migration, Queries: migration.Up})
402400
}
403401
}
404402
return missing

0 commit comments

Comments
 (0)