Skip to content

ref(dashboards): Remove DashboardTombstone model#114265

Merged
gggritso merged 2 commits into
masterfrom
georgegritsouk/dain-1567-remove-dashboardtombstone-model
Apr 29, 2026
Merged

ref(dashboards): Remove DashboardTombstone model#114265
gggritso merged 2 commits into
masterfrom
georgegritsouk/dain-1567-remove-dashboardtombstone-model

Conversation

@gggritso

@gggritso gggritso commented Apr 29, 2026

Copy link
Copy Markdown
Member

Remove the DashboardTombstone model class, all code references, and add the MOVE_TO_PENDING migration. DashboardTombstone was used to track if users deleted the pre-built "General" dashboard, but that dashboards no longer exists. Pre-built dashboards now use a new system where they're stored in the database as stubs. So, tombstones are no longer needed! Actual deletion in another PR, this just removes the model and the FK constraint.

This PR was semi Claude-ed, if someone could give it a close look I'd appreciate it!

Remove the DashboardTombstone model class and all code references. The
model tracked which pre-built dashboards were deleted for an org, but
no production code references it anymore.

The database table is left in place — a follow-up migration will move
it to pending deletion, and a final migration will drop it.

Refs DAIN-1567
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Apr 29, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 29, 2026
CI requires the migration to ship alongside the model removal. Drop
the FK constraint and move to pending deletion state — the table stays
in PostgreSQL for rolling deploy safety.

Refs DAIN-1567
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/1074_remove_dashboardtombstone.py

for 1074_remove_dashboardtombstone in sentry

--
-- Alter field organization on dashboardtombstone
--
SET CONSTRAINTS "sentry_dashboardtomb_organization_id_fa5fbf63_fk_sentry_or" IMMEDIATE; ALTER TABLE "sentry_dashboardtombstone" DROP CONSTRAINT "sentry_dashboardtomb_organization_id_fa5fbf63_fk_sentry_or";
--
-- Moved model DashboardTombstone to pending deletion state
--
-- (no-op)

@gggritso gggritso requested a review from a team April 29, 2026 15:14
@gggritso gggritso marked this pull request as ready for review April 29, 2026 15:18
@gggritso gggritso requested review from a team as code owners April 29, 2026 15:18
@gggritso gggritso merged commit 391acfe into master Apr 29, 2026
83 of 84 checks passed
@gggritso gggritso deleted the georgegritsouk/dain-1567-remove-dashboardtombstone-model branch April 29, 2026 17:46
gggritso added a commit that referenced this pull request Apr 30, 2026
Drop the `sentry_dashboardtombstone` table from PostgreSQL via
`SafeDeleteModel(DELETE)`.

Do not merge this until #114265 has been deployed and verified in
production.

## PR Stack
1. #114265 — Remove model + `MOVE_TO_PENDING` migration
2. **#114267 ← this PR** — `DELETE` migration to drop the table (deploy
after #114265)

Refs DAIN-1567

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
cleptric pushed a commit that referenced this pull request May 5, 2026
Remove the `DashboardTombstone` model class, all code references, and
add the `MOVE_TO_PENDING` migration. `DashboardTombstone` was used to
track if users deleted the pre-built "General" dashboard, but that
dashboards no longer exists. Pre-built dashboards now use a new system
where they're stored in the database as stubs. So, tombstones are no
longer needed! Actual deletion in another PR, this just removes the
model and the FK constraint.

This PR was semi Claude-ed, if someone could give it a close look I'd
appreciate it!

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
cleptric pushed a commit that referenced this pull request May 5, 2026
Drop the `sentry_dashboardtombstone` table from PostgreSQL via
`SafeDeleteModel(DELETE)`.

Do not merge this until #114265 has been deployed and verified in
production.

## PR Stack
1. #114265 — Remove model + `MOVE_TO_PENDING` migration
2. **#114267 ← this PR** — `DELETE` migration to drop the table (deploy
after #114265)

Refs DAIN-1567

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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