. These two are joined by a many-to-many table, which holds of course its own
ID
ID
,
team_id
team_id
and
member_id
member_id
, as a composite primary key.
Team members can have varying privileges in their teams. They can have no privileges (received an invite), read-only (invited as a user) and read-write-delete (team manager).
I can solve this by having three different join tables:
project_invites
project_invites
,
project_members
project_members
and
project_admins
project_admins
. This seems lame.
I'd like to be able to define their role directly in the join table, and be able to use this when writing RLS policies. Is this possible? - and if so, how do I go about it?
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.