-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Remove excluded_projects & include_all_projects columns #81204
Conversation
This PR has a migration; here is the generated SQL for --
-- Moved alertrule.excluded_projects field to pending deletion state
--
-- (no-op)
--
-- Alter field include_all_projects on alertrule
--
ALTER TABLE "sentry_alertrule" ALTER COLUMN "include_all_projects" DROP NOT NULL;
--
-- Moved alertrule.include_all_projects field to pending deletion state
--
-- (no-op) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I'm assuming the AlertRuleExcludedProjects
will be removed separately.
Yep, I'll be removing that and |
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #81204 +/- ##
=======================================
Coverage 80.34% 80.34%
=======================================
Files 7216 7218 +2
Lines 319481 319524 +43
Branches 20779 20779
=======================================
+ Hits 256679 256725 +46
+ Misses 62408 62405 -3
Partials 394 394 |
281811b
to
481441f
Compare
SafeRemoveField( | ||
model_name="alertrule", | ||
name="excluded_projects", | ||
deletion_action=DeletionAction.MOVE_TO_PENDING, | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
In preparation for removing the `AlertRuleExcludedProjects` model (see #81020) we need to first remove the many to many `excluded_projects` column on the `AlertRule` model. We can take the opportunity to remove the now unused `include_all_projects` column. This PR uses the brand new `SafeRemoveField` option added in #81098
Follow up to #81204 to fully remove `excluded_projects` and `include_all_projects` from the `AlertRule` model which was blocking removing the `AlertRuleExcludedProjects` table.
In preparation for removing the `AlertRuleExcludedProjects` model (see #81020) we need to first remove the many to many `excluded_projects` column on the `AlertRule` model. We can take the opportunity to remove the now unused `include_all_projects` column. This PR uses the brand new `SafeRemoveField` option added in #81098
Follow up to #81204 to fully remove `excluded_projects` and `include_all_projects` from the `AlertRule` model which was blocking removing the `AlertRuleExcludedProjects` table.
In preparation for removing the
AlertRuleExcludedProjects
model (see #81020) we need to first remove the many to manyexcluded_projects
column on theAlertRule
model. We can take the opportunity to remove the now unusedinclude_all_projects
column. This PR uses the brand newSafeRemoveField
option added in #81098