diff --git a/packages/backend/src/db/postgre.ts b/packages/backend/src/db/postgre.ts index f7638a53d0..eb5fc2e186 100644 --- a/packages/backend/src/db/postgre.ts +++ b/packages/backend/src/db/postgre.ts @@ -209,7 +209,11 @@ export const db = new DataSource({ }); export async function initDb() { - await db.connect(); + if (db.isInitialized) { + // nop + } else { + await db.connect(); + } } export async function resetDb() {