Fix FK violations when pruning stale routes #32

Merged
TheFurya merged 2 commits from develop into main 2026-02-21 17:57:00 +01:00
Owner

Summary

  • Bulk DELETE FROM routes bypasses ORM-level cascades, causing FK violations on route_encounters and boss_battles
  • Manually delete route_encounters and nullify boss_battle.after_route_id before deleting stale routes
  • Skip pruning routes that are referenced by user encounters

Test plan

  • Run python -m app.seeds --prune against a database with stale routes and verify it completes without FK errors
## Summary - Bulk `DELETE FROM routes` bypasses ORM-level cascades, causing FK violations on `route_encounters` and `boss_battles` - Manually delete `route_encounters` and nullify `boss_battle.after_route_id` before deleting stale routes - Skip pruning routes that are referenced by user encounters ## Test plan - [ ] Run `python -m app.seeds --prune` against a database with stale routes and verify it completes without FK errors
TheFurya added 1 commit 2026-02-21 17:51:23 +01:00
Fix FK violations when pruning stale routes
Some checks failed
CI / backend-tests (push) Successful in 26s
CI / frontend-tests (push) Successful in 27s
CI / e2e-tests (push) Has been cancelled
3b63285bd1
Bulk delete bypasses ORM-level cascades, so manually delete
route_encounters, nullify boss_battle.after_route_id, and skip
routes referenced by user encounters before deleting stale routes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TheFurya added 1 commit 2026-02-21 17:54:37 +01:00
Split e2e tests into manual workflow_dispatch workflow
All checks were successful
CI / frontend-tests (push) Successful in 27s
CI / backend-tests (push) Successful in 26s
1513bb3658
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TheFurya merged commit 321b940398 into main 2026-02-21 17:57:00 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: pokemon/nuzlocke-tracker#32