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:
parent
c59e059976
commit
54b512f9e0
1 changed files with 1 additions and 2 deletions
|
|
@ -703,8 +703,7 @@ export async function migratePostgresIfEmpty(url: string): Promise<MigrationBoot
|
||||||
}
|
}
|
||||||
|
|
||||||
const db = drizzlePg(sql);
|
const db = drizzlePg(sql);
|
||||||
const migrationsFolder = fileURLToPath(new URL("./migrations", import.meta.url));
|
await migratePg(db, { migrationsFolder: MIGRATIONS_FOLDER });
|
||||||
await migratePg(db, { migrationsFolder });
|
|
||||||
|
|
||||||
return { migrated: true, reason: "migrated-empty-db", tableCount: 0 };
|
return { migrated: true, reason: "migrated-empty-db", tableCount: 0 };
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue