Public Access
1
0
Files
leads4less/db/migrations/0007_workspace_roles_owner_member.sql
T
pguerrerox f5e7e966e3 feat: introduce app-admin authorization and audit logging
- add migrations for owner/member workspace roles and application admins

- centralize /admin access checks with DB-backed admin resolution

- audit admin analytics/billing route access

- update account/admin UI typing and env/docs for ADMIN_EMAILS fallback behavior
2026-05-25 15:25:59 +00:00

11 lines
307 B
SQL

update public.workspace_memberships
set role = 'member'
where role = 'admin';
alter table public.workspace_memberships
drop constraint if exists workspace_memberships_role_check;
alter table public.workspace_memberships
add constraint workspace_memberships_role_check
check (role in ('owner', 'member'));