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; `);