-
Notifications
You must be signed in to change notification settings - Fork 0
fix(deletions): Fix MonitorIncident FK to MonitorCheckIn cascade #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix(deletions): Fix MonitorIncident FK to MonitorCheckIn cascade #134
Conversation
While these FKs are supposed to have CASCADE on them according to our models, they are in fact not in the DB. Trying to run this to force them to be CASCADE
|
Add migration to enforce CASCADE delete from This PR introduces a new Django migration that updates two foreign-key fields on the Key Changes• Added migration Affected Areas• This summary was automatically generated by @propel-code-bot |
WalkthroughUpdates the monitors migration lockfile entry from 0012_remove_monitor_is_muted_field to 0013_fix_monitorincident_checkin_cascade and introduces a new Django migration that modifies MonitorIncident foreign key fields (starting_checkin, resolving_checkin) to use FlexibleForeignKey with cascade deletion and explicit nullability. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (1)src/sentry/monitors/migrations/0013_fix_monitorincident_checkin_cascade.py (1)
🪛 Ruff (0.14.5)src/sentry/monitors/migrations/0013_fix_monitorincident_checkin_cascade.py25-27: Mutable class attributes should be annotated with (RUF012) 29-50: Mutable class attributes should be annotated with (RUF012) 🔇 Additional comments (5)
Comment |
While these FKs are supposed to have CASCADE on them according to our models, they are in fact not in the DB. Trying to run this to force them to be CASCADE in production
Copied from getsentry#103698
Original PR: getsentry#103698
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.