Skip to content

[Tech-debt] Decide orgHandle immutability vs migrate child FKs to surrogate orgUID #127

@Salem874

Description

@Salem874

Problem

Core FKs (tblUsers, tblOrgDomains, tblOrgShortDomains, tblOrgInvitations, tblUserAccountTypes, …) target the mutable business key orgHandle rather than a surrogate orgUID. Handle renames cascade across all child tables and couple everything to a mutable string.

Decision needed (pre-launch — cheap now, expensive after data grows)

Either (a) formally document orgHandle as immutable (keep ON UPDATE CASCADE as a safety net), or (b) migrate child FKs to orgUID.

Acceptance criteria

  • Decision recorded in DATABASE.md; schema/docs consistent.

From the 2026-06-04 schema review — see docs/SCHEMA_REVIEW_2026-06-04.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions