You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(codegen): add self-FK on simulation_branches + four enum CHECKs (#79)
Closes#43.
The overlay DDL had no structural enforcement of:
- `simulation_branches.parent_branch` referencing `branch_id`
(self-referencing tree of branches)
- the four enum-shaped TEXT columns:
* `simulation_branches.status` ∈ {active, merged, abandoned}
* `provenance_log.operation` ∈ {insert, update, delete, transform}
* `access_policies.access_level` ∈ {read, write, admin, deny}
* `lineage_graph.derivation_type` ∈ {copy, transform, aggregate, join, filter}
Anything could be written to those columns; downstream consumers had to
re-validate every row.
Add the FK (NULL still allowed for root branches) and the four CHECK
constraints. Test `test_overlay_has_enum_checks_and_fk` asserts each by
substring against the generated DDL.
`cargo clippy --all-targets -- -D warnings` clean; 36 unit tests pass.
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments