Five identity tables store a status the database does not constrain #54

Open
opened 2026-09-21 07:18:17 +00:00 by cgalo5758 · 0 comments
Owner

What a contributor runs into

The lifecycle status on users, persons, organizations, workspaces and memberships is free text. The vocabulary exists only as string comparisons in Go, so the set of values a column may hold has to be reconstructed by grep, and a typo in a writer or a repair script stores a status no reader recognises without anything failing.

Why it costs

Readers branch on these values, one of them refusing entry to a workspace, and a value nobody planned for takes the else branch silently. The same gap on the subscription status was closed with a check constraint over the full vocabulary; these five columns are the remaining ones.

Where

The identity tables in the baseline migration; the Go comparisons that read each status.

Done when

Each column is constrained to its vocabulary in the database, the Go readers use the same list, and a value outside it is rejected at the write.

Migrated from status/issues.md at b7a0e15

## What a contributor runs into The lifecycle status on users, persons, organizations, workspaces and memberships is free text. The vocabulary exists only as string comparisons in Go, so the set of values a column may hold has to be reconstructed by grep, and a typo in a writer or a repair script stores a status no reader recognises without anything failing. ## Why it costs Readers branch on these values, one of them refusing entry to a workspace, and a value nobody planned for takes the else branch silently. The same gap on the subscription status was closed with a check constraint over the full vocabulary; these five columns are the remaining ones. ## Where The identity tables in the baseline migration; the Go comparisons that read each status. ## Done when Each column is constrained to its vocabulary in the database, the Go readers use the same list, and a value outside it is rejected at the write. Migrated from status/issues.md at b7a0e15
cgalo5758 added the
kind
debt
area/identity
labels 2026-09-21 07:18:17 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#54