postgresql DB

Owns the `invite_codes` table (producer side of the cross-feature data row).

Function I/O

NameInOutSidePurpose
INSERT_invite_codesrowrowidwritePersists the issued invite row.

Variables

NameTypeScopePurpose
invite_codes.codetextpersistUnique business key consumed by the registration flow.
invite_codes.consumed_attimestamptzpersistStays null until the registration flow consumes the code.

Internal data flow

1 Accept INSERT from invite-issuance-service. 2 Enforce unique constraint on code. 3 Return new rowid.

Errors

NameWhenMeans
ErrUniqueViolationTwo issuance attempts pick the same code.Bubble up so issuance can retry.