Skip to content

ref(aci): Retire the remaining Incident model definition - #128399

Open
shashjar wants to merge 2 commits into
shashjar/iswf-3254-remove-incident-lifecyclefrom
shashjar/iswf-3254-retire-incident-schema
Open

shashjar wants to merge 2 commits into
shashjar/iswf-3254-remove-incident-lifecyclefrom
shashjar/iswf-3254-retire-incident-schema

Conversation

@shashjar

@shashjar shashjar commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Refs https://linear.app/getsentry/issue/ISWF-3254/remove-incident-model.

Retire the remaining Incident model definition with SafeDeleteModel(MOVE_TO_PENDING). The PostgreSQL table and historical mappings remain intact.

@linear-code

linear-code Bot commented Oct 21, 2026

Copy link
Copy Markdown

ISWF-3254

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/1234_detach_incident_foreign_keys.py src/sentry/migrations/1235_retire_incident.py

for 1234_detach_incident_foreign_keys in sentry

--
-- Alter field alert_rule on incident
--
SET CONSTRAINTS "sentry_incident_alert_rule_id_2f44ba42_fk_sentry_alertrule_id" IMMEDIATE; ALTER TABLE "sentry_incident" DROP CONSTRAINT "sentry_incident_alert_rule_id_2f44ba42_fk_sentry_alertrule_id";
--
-- Alter field organization on incident
--
SET CONSTRAINTS "sentry_incident_organization_id_6c154718_fk_sentry_or" IMMEDIATE; ALTER TABLE "sentry_incident" DROP CONSTRAINT "sentry_incident_organization_id_6c154718_fk_sentry_or";
--
-- Alter field subscription on incident
--
SET CONSTRAINTS "sentry_incident_subscription_id_ba61b3bb_fk_sentry_qu" IMMEDIATE; ALTER TABLE "sentry_incident" DROP CONSTRAINT "sentry_incident_subscription_id_ba61b3bb_fk_sentry_qu";

for 1235_retire_incident in sentry

--
-- Moved model Incident to pending deletion state
--
-- (no-op)

@shashjar shashjar changed the title ref(aci): Retire the remaining Incident model definition ref(aci): Retire the remaining Incident model definition Oct 21, 2026
@shashjar
shashjar marked this pull request as ready for review October 21, 2026 18:48
@shashjar
shashjar requested review from a team as code owners October 21, 2026 18:48
@shashjar
shashjar force-pushed the shashjar/iswf-3254-retire-incident-schema branch from 7bf8ccb to 4ebde72 Compare October 23, 2026 20:04

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants