app.active_org_selections
TableRow level security on
The org each sign-in chose in the context switcher (ADR 0007 item 1). The custom access token hook copies it into the org_id claim while the membership is active. Written only through app.set_active_org.
Primary key: user_id
| Column | Type | Nullable | Description |
|---|---|---|---|
| user_id | uuid | No | Sign-in (auth.users.id) that made the choice; one row per sign-in.References auth.users.id |
| org_id | uuid | No | Chosen org. A choice whose membership ended stays here but no longer reaches the token.References app.organizations.id |
| selected_at | timestamp with time zone | No | When the org was last chosen. |