Skip to content

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

chore: used concurrently

Sheen Capadnganc3019a0709d8
diff --git a/backend/src/db/migrations/20260306202508_add-missing-secret-versions-v2-indexes.ts b/backend/src/db/migrations/20260306202508_add-missing-secret-versions-v2-indexes.ts
index 17fe57b4dc..adedf426d0 100644
--- a/backend/src/db/migrations/20260306202508_add-missing-secret-versions-v2-indexes.ts
+++ b/backend/src/db/migrations/20260306202508_add-missing-secret-versions-v2-indexes.ts
@@ -12,13 +12,9 @@ export async function up(knex: Knex): Promise<void> {
try {
await knex.raw(`SET statement_timeout = ${MIGRATION_TIMEOUT}`);
- const indexExists = await knex.raw(`SELECT 1 FROM pg_indexes WHERE indexname = ?`, [INDEX_NAME]);
-
- if (indexExists.rows.length === 0) {
- await knex.raw(
- `CREATE INDEX CONCURRENTLY "${INDEX_NAME}" ON "${TableName.SecretVersionV2}" ("secretId", "version")`
- );
- }
+ await knex.raw(
+ `CREATE INDEX CONCURRENTLY IF NOT EXISTS "${INDEX_NAME}" ON "${TableName.SecretVersionV2}" ("secretId", "version")`
+ );
} finally {
await knex.raw(`SET statement_timeout = '${originalTimeout}'`);
}