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(V2): guard shared deletes against staged references
Add referential integrity guards for methodology, program, stakeholder, and
label deletes so they block when links exist in committed tables or in
staged INSERT/UPDATE rows, with explicit force-delete override support.
Extend integration coverage for live and staged reference conflicts and
update live API delete helpers/docs to reflect and exercise the guard flow.
Copy file name to clipboardExpand all lines: docs/cadt_rpc_api_v2.md
+80-8Lines changed: 80 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1890,20 +1890,38 @@ Response
1890
1890
1891
1891
**Note**: The ID in the URL path is the `cadTrustMethodologyId`.
1892
1892
1893
+
**Referential integrity**: If any committed or staged (`INSERT`/`UPDATE`) `project_methodology` records reference this methodology, the request returns `409 Conflict`. Pass `?force=true` to bypass the guard and stage the delete anyway.
**Note**: The ID in the URL path is the `cadTrustProgramId`.
2060
2078
2079
+
**Referential integrity**: If any committed or staged (`INSERT`/`UPDATE`) `project` records reference this program via `cadTrustProgramId`, the request returns `409 Conflict`. Pass `?force=true` to bypass the guard and stage the delete anyway.
**Note**: The ID in the URL path is the `cadTrustStakeholderId`.
4529
4565
4566
+
**Referential integrity**: If any committed or staged (`INSERT`/`UPDATE`) `stakeholder_projects` records reference this stakeholder, the request returns `409 Conflict`. Pass `?force=true` to bypass the guard and stage the delete anyway.
**Note**: The ID in the URL path is the `cadTrustLabelId`.
4839
4893
4894
+
**Referential integrity**: If any committed or staged (`INSERT`/`UPDATE`) `unit_label` records reference this label, the request returns `409 Conflict`. Pass `?force=true` to bypass the guard and stage the delete anyway.
0 commit comments