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:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user