Open ceorourke opened 2 days ago
This PR has a migration; here is the generated SQL for src/sentry/migrations/0793_remove_db_constraint_alert_rule_exclusion.py
()
--
-- Alter field alert_rule on alertruleexcludedprojects
--
SET CONSTRAINTS "sentry_alertruleexcl_alert_rule_id_7611518a_fk_sentry_al" IMMEDIATE; ALTER TABLE "sentry_alertruleexcludedprojects" DROP CONSTRAINT "sentry_alertruleexcl_alert_rule_id_7611518a_fk_sentry_al";
--
-- Alter field alert_rule_trigger on alertruletriggerexclusion
--
SET CONSTRAINTS "sentry_alertruletrig_alert_rule_trigger_i_82ac5b81_fk_sentry_al" IMMEDIATE; ALTER TABLE "sentry_alertruletriggerexclusion" DROP CONSTRAINT "sentry_alertruletrig_alert_rule_trigger_i_82ac5b81_fk_sentry_al";
--
-- Alter field query_subscription on alertruletriggerexclusion
--
SET CONSTRAINTS "sentry_alertruletrig_query_subscription_i_244687c4_fk_sentry_qu" IMMEDIATE; ALTER TABLE "sentry_alertruletriggerexclusion" DROP CONSTRAINT "sentry_alertruletrig_query_subscription_i_244687c4_fk_sentry_qu";
All modified and coverable lines are covered by tests :white_check_mark:
:white_check_mark: All tests successful. No failed tests found.
A follow up to https://github.com/getsentry/sentry/pull/79700 and a step towards removing the
AlertRuleExcludedProjects
andAlertRuleTriggerExclusion
models.This sets the foreign keys'
db_constraint
to False and removes any lingering code that references the tables or usage of the columns. I removed references to theAlertRule
excluded_projects
andinclude_all_projects
fields from the serializer as well since they're unused.The only place that still references them is in the backup tests that can't be removed until we're removing the table in the next step.