Files
coder/coderd/database/migrations/000243_custom_role_pkey_fix.up.sql
Steven Masley 84fdfd2a18 chore: remove UpsertCustomRole in favor of Insert + Update (#14217)
* chore: remove UpsertCustomRole in favor of Insert + Update

---------

Co-authored-by: Jaayden Halko <jaayden.halko@gmail.com>
2024-08-13 12:53:47 -05:00

7 lines
200 B
SQL

ALTER TABLE custom_roles
DROP CONSTRAINT custom_roles_pkey;
-- Roles are unique to the organization.
ALTER TABLE custom_roles
ADD CONSTRAINT custom_roles_unique_key UNIQUE (name, organization_id);