Skip to content

Commit b14b452

Browse files
shellmayrgeorge-sentry
authored andcommitted
ref(dynamic-sampling): Drop CustomDynamicSamplingRule tables (#112453)
Step 2 of the table deletion process: physically drop the sentry_customdynamicsamplingrule and sentry_customdynamicsamplingruleproject tables from PostgreSQL. The previous migration (1063) already removed foreign key constraints and moved the models to pending deletion state.
1 parent f92d2c3 commit b14b452

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

migrations_lockfile.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ replays: 0007_organizationmember_replay_access
3131

3232
seer: 0005_delete_seerorganizationsettings
3333

34-
sentry: 1064_eventattachment_date_expires_now
34+
sentry: 1065_delete_customdynamicsamplingrule
3535

3636
social_auth: 0003_social_auth_json_field
3737

src/sentry/db/router.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ class SiloRouter:
7676
"sentry_alertruleactivations": SiloMode.CELL,
7777
"sentry_alertruleactivationcondition": SiloMode.CELL,
7878
"sentry_code_review_event": SiloMode.CELL,
79+
"sentry_customdynamicsamplingrule": SiloMode.CELL,
80+
"sentry_customdynamicsamplingruleproject": SiloMode.CELL,
7981
"sentry_dashboardwidgetsnapshot": SiloMode.CELL,
8082
"sentry_datasecrecywaiver": SiloMode.CELL,
8183
"sentry_incidentseen": SiloMode.CELL,
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from sentry.new_migrations.migrations import CheckedMigration
2+
from sentry.new_migrations.monkey.models import SafeDeleteModel
3+
from sentry.new_migrations.monkey.state import DeletionAction
4+
5+
6+
class Migration(CheckedMigration):
7+
is_post_deployment = False
8+
9+
dependencies = [
10+
("sentry", "1064_eventattachment_date_expires_now"),
11+
]
12+
13+
operations = [
14+
SafeDeleteModel(
15+
name="CustomDynamicSamplingRuleProject",
16+
deletion_action=DeletionAction.DELETE,
17+
),
18+
SafeDeleteModel(
19+
name="CustomDynamicSamplingRule",
20+
deletion_action=DeletionAction.DELETE,
21+
),
22+
]

0 commit comments

Comments
 (0)