-- Run this in Supabase SQL Editor to allow a read-only viewer role.
alter table public.collection_members
  drop constraint if exists collection_members_role_check;

alter table public.collection_members
  add constraint collection_members_role_check
  check (role in ('owner', 'member', 'viewer'));
