From d2a6a47397fe4bbf15110336233425665ac0c3bf Mon Sep 17 00:00:00 2001 From: = Date: Wed, 8 Oct 2025 01:59:08 +0530 Subject: [PATCH] feat: resolved migration failure in index --- .../src/db/migrations/20251005152640_simplify-membership.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/db/migrations/20251005152640_simplify-membership.ts b/backend/src/db/migrations/20251005152640_simplify-membership.ts index dbd669793..25fd19070 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; `);