Skip to content

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

feat: resolved migration failure in index

=d2a6a47397fe
diff --git a/backend/src/db/migrations/20251005152640_simplify-membership.ts b/backend/src/db/migrations/20251005152640_simplify-membership.ts
index dbd6697934..25fd190705 100644
--- a/backend/src/db/migrations/20251005152640_simplify-membership.ts
+++ b/backend/src/db/migrations/20251005152640_simplify-membership.ts
@@ -107,19 +107,19 @@ const createRoleTable = async (knex: Knex) => {
await knex.schema.raw(`
CREATE UNIQUE INDEX role_name_org_id_unique
- ON "${TableName.Role}" (name, "orgId")
+ ON "${TableName.Role}" (slug, "orgId")
WHERE "orgId" IS NOT NULL;
`);
await knex.schema.raw(`
CREATE UNIQUE INDEX role_name_project_id_unique
- ON "${TableName.Role}" (name, "projectId")
+ ON "${TableName.Role}" (slug, "projectId")
WHERE "projectId" IS NOT NULL;
`);
await knex.schema.raw(`
CREATE UNIQUE INDEX role_name_namespace_id_unique
- ON "${TableName.Role}" (name, "namespaceId")
+ ON "${TableName.Role}" (slug, "namespaceId")
WHERE "namespaceId" IS NOT NULL;
`);