diff --git a/source/runners/migrator.ts b/source/runners/migrator.ts index 079acd881..692946a4f 100644 --- a/source/runners/migrator.ts +++ b/source/runners/migrator.ts @@ -110,7 +110,7 @@ async function rollback({ type AvailableMigrations = Record; async function getAvailableMigrations(): Promise { const migrationFilenames = await Array.fromAsync(new Bun.Glob("*.ts").scan(constants.directories.migrations)).then( - (filenames) => filenames.toSorted(), + (filenames) => filenames.toSorted((a, b) => a.localeCompare(b, "en", { sensitivity: "base" })), ); return Object.fromEntries(migrationFilenames.map((filename) => [filename.split("_").at(0)!, filename]));