PR #261 · pramaan-io/pramaan-functions · merged 2026-06-06
sequenceDiagram autonumber participant db as Database participant mig as Migration 0073 mig->>mig: scan references mig->>db: delete system forum rows mig->>db: drop source column mig->>db: firm_id NOT NULL mig->>mig: drop source-aware RLS mig->>db: create firm-only RLS mig->>mig: drop old ref trigger mig->>db: create firm-only ref trigger
| Method | in → out | what it does |
|---|---|---|
_drop_forum_rls | () → None | |
_create_firm_only_rls | () → None | |
_create_source_aware_rls | () → None |
Alembic migration that removes system forum rows, drops the source discriminator, makes firm_id NOT NULL, and rebuilds RLS plus the reference trigger to firm-only.
| new method | signature |
|---|---|
_drop_forum_rls | () → None |
_create_firm_only_rls | () → None |
_create_source_aware_rls | () → None |
_reject_referenced_system_forums | () → None |
_create_firm_only_reference_trigger | () → None |
_create_source_aware_reference_trigger | () → None |
_seed_downgrade_system_forums | () → None |
upgrade | () → None |
downgrade | () → None |
revision : strdown_revision : str | Sequence[str] | Nonebranch_labels : str | Sequence[str] | Nonedepends_on : str | Sequence[str] | Nonesrc/domains/forum/entity.py+10 −30Forum SQLAlchemy entity where firm_id is now a required UUID, removing the optionality that supported system forums.
firm_id : UUIDForum DTO where firm_id is required and ForumSource is gone from the public contract.
firm_id : UUID