Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

wrap wheres in callback

x0322058ee90f385d99
diff --git a/backend/src/db/migrations/20260603030053_pam-revamp.ts b/backend/src/db/migrations/20260603030053_pam-revamp.ts
index e74633ae40..1cc20749e3 100644
--- a/backend/src/db/migrations/20260603030053_pam-revamp.ts
+++ b/backend/src/db/migrations/20260603030053_pam-revamp.ts
@@ -372,7 +372,9 @@ export async function up(knex: Knex): Promise<void> {
}
// Clean up orphaned accounts and deduplicate before adding constraints
- await knex(TableName.PamAccount).whereNull("folderId").orWhereNull("templateId").delete();
+ await knex(TableName.PamAccount)
+ .where((qb) => qb.whereNull("folderId").orWhereNull("templateId"))
+ .delete();
await knex.raw(`
UPDATE ${TableName.PamAccount} a