Himsog.Life

Tournament Manager

Database schema foundation

The PostgreSQL outline has been converted into a real migration with module ownership, status catalogs, indexes, and public-data privacy rules.

41 tablesImmutable audit logOrganization scoped

Platform and Auth

3

Organizer tenancy, application users, memberships, and auth profile references.

organizationsorganization_membershipsusers

Players and Registration

8

Players remain separate from users, allowing guest registration and duplicate warnings.

playerscustom_fieldscustom_field_valuesteamsteam_playersregistrationswaiver_acceptancesplayer_check_ins

Tournament Setup

7

Tournaments, venues, courts, divisions, formats, and combined-division history.

tournamentsvenuescourtscourt_availability_blocksdivisionsdivision_combinationsmatch_formats

Competition Engine

11

Pools, matches, submitted results, official results, game-level rows, standings, and brackets.

poolspool_teamsmatchesmatch_result_submissionsofficial_match_resultsmatch_gamesstanding_snapshotsstanding_rowsbracketsbracket_seedsbracket_matches

Live Operations

4

Referee assignment, unavailability, volunteer roles, and volunteer shifts.

referee_assignmentsreferee_unavailabilityvolunteer_rolesvolunteer_shifts

Communication and Display

3

Announcements, notification events, and public TV/display settings.

announcementsnotification_eventspublic_display_settings

Files, Imports, Exports, Scoresheets

4

Uploaded assets, spreadsheet import jobs, export jobs, and scoresheet batches.

filesimport_jobsexport_jobsscoresheet_batches

Audit

1

Append-only audit trail for admin-visible history and reports.

audit_logs

Status Catalog

Database check constraints and app modules use the same vocabulary.

AreaStatuses
tournamentdraft, published, registration_open, registration_closed, in_progress, completed, archived, canceled
divisiondraft, registration_open, registration_closed, pools_generated, schedule_generated, in_progress, bracket_ready, bracket_published, completed, canceled
teampending, confirmed, waitlisted, withdrawn, disqualified
paymentunpaid, partial, paid, refunded, waived
matchnot_scheduled, scheduled, called_to_court, in_progress, submitted_by_referee, under_review, official_final, disputed, delayed, completed, forfeited, canceled
resultsubmitted, under_review, rejected, approved
bracketdraft, generated, edited, published, completed

Public Privacy

Fields excluded from public organization, tournament, player, and team queries.

emailphonecontact_emailcontact_phoneemergency_contact_nameemergency_contact_phonepayment_statuspayment_methodamount_paidpayment_received_datenotesinternal_notesaudit_logs

Data Separation Rule

These rules are enforced in domain helpers and mirrored by database indexes.

Rule

Every admin query is scoped by organization unless the actor is Platform Admin.

Rule

Tournament-level staff only access tournaments where they have permission.

Rule

Public queries return only published public data.

Rule

Public views hide email, phone, emergency contacts, payment status, internal notes, and audit logs.