KB-FD32 rev 2

P3D — Birth System B3-P Policy Storage Design rev2

2 min read Revision 2
p3dbirth-systemb3ppolicy-storagedesignrev2

P3D — Birth System B3-P Policy Storage Design rev2

Date: 2026-05-12 Rev: 2 (type compatibility, constraint naming, rollback restore old values)



5. Type compatibility rules

Column Acceptable type Exact match On conflict
coverage_status varchar OR text Either acceptable If exists with different type → BLOCKED
coverage_scope_status varchar OR text Either acceptable If exists with different type → BLOCKED
coverage_exemption_reason text text only BLOCKED if different
coverage_review_owner text text only BLOCKED if different
coverage_decided_at timestamptz exact BLOCKED if timestamp without tz
coverage_decided_by text text only BLOCKED if different

6. CHECK constraint naming convention

chk_<table>_<column>
Example: chk_collection_registry_coverage_status

Before creating: verify no existing constraint with same name. If exists → compare allowed values. Same → OK. Different → BLOCKED_EXISTING_CONFLICT.


7. Population rollback = restore old values, not blanket NULL

Before UPDATE, Agent captures for EACH row:

(collection_name, old_coverage_status, old_coverage_scope_status, old_coverage_exemption_reason, old_coverage_review_owner, old_coverage_decided_at, old_coverage_decided_by)

Rollback restores these exact old values per row. If old value was NULL → restore to NULL (which is functionally same as blanket NULL, but semantically correct because it's per-row).


8. (Unchanged — governance role mapping, 2-pass pattern, sequence)


B3-P Design rev2 | 2026-05-12

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/design/p3d-birth-system-b3p-policy-storage-and-onboarding-contract.md