fix(db): reuse MIGRATIONS_FOLDER constant instead of recomputing

The local migrationsFolder variable in migratePostgresIfEmpty duplicated
the module-level MIGRATIONS_FOLDER constant. Reuse the constant to keep
a single source of truth for the migration path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt Van Horn
2026-03-07 17:01:36 -08:00
parent c59e059976
commit 54b512f9e0

View File

@@ -703,8 +703,7 @@ export async function migratePostgresIfEmpty(url: string): Promise<MigrationBoot
}
const db = drizzlePg(sql);
const migrationsFolder = fileURLToPath(new URL("./migrations", import.meta.url));
await migratePg(db, { migrationsFolder });
await migratePg(db, { migrationsFolder: MIGRATIONS_FOLDER });
return { migrated: true, reason: "migrated-empty-db", tableCount: 0 };
} finally {