ref(dashboards): Drop DashboardTombstone table#114267
Conversation
|
This PR has a migration; here is the generated SQL for for --
-- 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)for --
-- Delete model DashboardTombstone
--
DROP TABLE "sentry_dashboardtombstone" CASCADE; |
wedamija
left a comment
There was a problem hiding this comment.
This mostly lgtm, but you'll need to fix this test failure to make sure the table is really deleted
ValueError: Cannot determine database for deleted model sentry.DashboardTombstone (table: sentry_dashboardtombstone). This table must be added to historical_silo_assignments in src/sentry/db/router.py (or getsentry/db/router.py for getsentry models) with the appropriate SiloMode before the deletion migration can run.
wedamija
left a comment
There was a problem hiding this comment.
Migration 1075 lgtm, just need to rebase and clean up
Delete the sentry_dashboardtombstone table from PostgreSQL. The model was moved to pending deletion in the previous migration. Refs DAIN-1567 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The DELETE migration needs to know which database the table lives on. Since the model class is already removed, the router falls back to historical_silo_assignments to resolve silo mode. Refs DAIN-1567 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34cefd9 to
abc212f
Compare
|
This PR has a migration; here is the generated SQL for for --
-- Delete model DashboardTombstone
--
DROP TABLE "sentry_dashboardtombstone" CASCADE; |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0137160. Configure here.
|
This PR has a migration; here is the generated SQL for for --
-- Delete model DashboardTombstone
--
DROP TABLE "sentry_dashboardtombstone" CASCADE; |
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>

Drop the
sentry_dashboardtombstonetable from PostgreSQL viaSafeDeleteModel(DELETE).Do not merge this until #114265 has been deployed and verified in production.
PR Stack
MOVE_TO_PENDINGmigrationDELETEmigration to drop the table (deploy after ref(dashboards): Remove DashboardTombstone model #114265)Refs DAIN-1567