Env var to disable db migrations, nix: drop pre-start service

This commit is contained in:
Rory& committed 2026-02-03 08:11:09 +01:00
1 parent e5ce3b54ce
commit 44b6043099
2 files changed
+6 -30

No files matched your search

+4 -2
View File
@@ -132,8 +132,10 @@ export async function initDatabase(): Promise<DataSource> {
await qr.release();
}
console.log("[Database] Applying missing migrations, if any.");
await dbConnection.runMigrations();
if (process.env.APPLY_DB_MIGRATIONS !== "false") {
console.log("[Database] Applying missing migrations, if any.");
await dbConnection.runMigrations();
}
console.log(`[Database] ${green("Connected")}`);