engine
Tables
Section titled “Tables”| Name | Columns | Comment | Type |
|---|---|---|---|
| public.app_user | 9 | A person with an account. Created together with their canonical player, their self ghost player and their three privacy settings (PROFILE, MATCH_HISTORY, MATCH_DETAILS, all PRIVATE). | BASE TABLE |
| public.app_user_identity | 8 | A way to sign in as a user (identity provider + subject). Invariant (application): a user cannot remove their last remaining identity. | BASE TABLE |
| public.canonical_player | 6 | The authoritative identity of a person in gaming history, created when the user registers. Ghost players are linked to it through claim edges. | BASE TABLE |
| public.ghost_player | 9 | A player as a match recorder knows them, in the recorder’s own list. Soft-deleted: a deleted ghost player stays in the matches it played, but is no longer listed, suggested or usable in new matches and claim requests. Invariant (application): deleting a ghost player revokes its active claim edges. | BASE TABLE |
| public.game | 14 | The catalogue of games. Games are created and updated by the game catalog service, which publishes reviewed candidates. | BASE TABLE |
| public.expansion | 10 | An expansion of a game; it has no meaning on its own. | BASE TABLE |
| public.app_group | 8 | A named roster of users, owned by one user, used for privileged access and community admins. Soft-deleted: a deleted group grants nothing any more, although its rows still exist. | BASE TABLE |
| public.group_member | 3 | BASE TABLE | |
| public.playset | 11 | A reusable match configuration (variants, scenario, expansions) for one game. Soft-deleted: matches keep referring to a deleted playset, but it can no longer be chosen. Invariant (application): its expansions belong to its game. | BASE TABLE |
| public.playset_expansion | 2 | BASE TABLE | |
| public.community | 11 | A set of users with a shared match history. Soft-deleted. Invariants (application): the admin group, if set, is owned by the community’s owner and is cleared when ownership is transferred; only the owner may remove an admin, any admin may remove a non-admin member; an admin who leaves or is removed is also removed from the admin group. | BASE TABLE |
| public.membership | 7 | A user’s membership of a community; joined_at is when they joined. | BASE TABLE |
| public.membership_request | 10 | A request to join a community with the REQUIRES_APPROVAL join policy. Invariant (application): the decider is the community’s owner or a member of its admin group. | BASE TABLE |
| public.match | 15 | The aggregate root of gaming history. DRAFT while finalized_at is NULL: freely editable, and participants that are removed are deleted. FINALIZED afterwards: changed only through match edits. Deleting a match (only while DRAFT) soft-deletes it together with its participants. Invariants (application): the playset, if set, is for the same game; the expansions belong to the game. | BASE TABLE |
| public.match_expansion | 2 | BASE TABLE | |
| public.match_loadout | 6 | Per-participant configuration of a match (faction, character, …). Owned by the participant that refers to it (match_participant.loadout_id) and deleted together with it. | BASE TABLE |
| public.match_participant | 15 | A player’s result in a match. Removed from a DRAFT match by deleting the row (and its loadout); soft-deleted only together with its match. Invariant (application): a dispute is raised by a user whose canonical player has an active claim edge to the participant’s ghost player. | BASE TABLE |
| public.claim_request | 9 | A proposal to link ghost players to a canonical player. Approval creates a claim edge per ghost player. Invariant (application): deleted ghost players cannot be claimed. | BASE TABLE |
| public.claim_request_target | 2 | BASE TABLE | |
| public.claim_edge | 10 | The approved, revocable link between a canonical player and a ghost player. Invariant (application): the claim edge of a user’s self ghost player is never revoked. | BASE TABLE |
| public.match_edit | 13 | A proposed change to a finalized match. Invariants (application): the decider is the match’s recorder; an edit only changes participants of its own match; a new playset is for the match’s game and new expansions belong to it; only the flagged (*_set) fields are written on approval. | BASE TABLE |
| public.match_edit_expansion_change | 2 | BASE TABLE | |
| public.match_edit_participant_change | 12 | The new result of one participant, proposed by a match edit. | BASE TABLE |
| public.match_edit_loadout_change | 7 | The new loadout attributes of one participant, proposed by a match edit; they replace the current ones. | BASE TABLE |
| public.trusted_editor | 9 | A grant by which a match recorder (grantor) has the match edits of the trustee approved automatically. | BASE TABLE |
| public.privacy_setting | 8 | Who may see a kind of data of a user. Invariants (application): every user has exactly one setting per data type, created PRIVATE together with the user, and settings are never deleted; the groups of a setting are owned by its user. | BASE TABLE |
| public.privacy_setting_group | 2 | BASE TABLE | |
| public.idempotency_record | 9 | BASE TABLE |
Relations
Section titled “Relations”Generated by tbls