Open
Description
The migration code is doing a lexicographical sort on the timestamp part of the migration filename. That is technically incorrect and fails if one uses a non-timestamp prefix (i.e., I use ints 0_migrate.up.sql, 1_migrate.up.sql, etc.).
This is the problematic code: https://github.com/uptrace/bun/blob/master/migrate/migration.go#L292-L302
There is zero harm in changing that code to convert the value to an int64 and performing a numeric sort. Doing so works in both cases.
Metadata
Metadata
Assignees
Labels
No labels