Skip to content

Commit e2b42d1

Browse files
authored
use fixed length array (#288)
1 parent 563a2f0 commit e2b42d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

migrate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ func (ms MigrationSet) planMigrationCommon(db *sql.DB, dialect string, m Migrati
640640
}
641641

642642
// Sort migrations that have been run by Id.
643-
var existingMigrations []*Migration
643+
existingMigrations := make([]*Migration, 0, len(migrationRecords))
644644
for _, migrationRecord := range migrationRecords {
645645
existingMigrations = append(existingMigrations, &Migration{
646646
Id: migrationRecord.Id,

0 commit comments

Comments
 (0)