fix(store): cascade delete related rows when removing a site #92

Merged
lerko merged 1 commits from fix/orphaned-maintenance-windows into main 2026-06-05 20:23:11 +00:00
Owner

Summary

  • DeleteSite() now removes maintenance_windows, check_history, and state_changes in a transaction before deleting the site
  • Prevents orphaned rows accumulating in the database

Test plan

  • TestDeleteSiteCascade — verifies all related rows are cleaned up
  • Full test suite passes

Closes #71

## Summary - `DeleteSite()` now removes maintenance_windows, check_history, and state_changes in a transaction before deleting the site - Prevents orphaned rows accumulating in the database ## Test plan - [x] `TestDeleteSiteCascade` — verifies all related rows are cleaned up - [x] Full test suite passes Closes #71
lerko added 1 commit 2026-06-05 16:55:52 +00:00
fix(store): cascade delete related rows when removing a site
CI / test (pull_request) Successful in 2m32s
CI / lint (pull_request) Successful in 56s
CI / vulncheck (pull_request) Successful in 51s
65a83368bf
DeleteSite now removes maintenance_windows, check_history, and
state_changes for the site within a transaction before deleting
the site itself. Prevents orphaned rows.

Closes #71
lerko merged commit 65a83368bf into main 2026-06-05 20:23:11 +00:00
lerko deleted branch fix/orphaned-maintenance-windows 2026-06-05 20:23:11 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lerkolabs/uptop#92