diff --git a/migrations_lockfile.txt b/migrations_lockfile.txt index 71a2b5e7045f6b..afdef09e8eb1fc 100644 --- a/migrations_lockfile.txt +++ b/migrations_lockfile.txt @@ -31,7 +31,7 @@ replays: 0007_organizationmember_replay_access seer: 0005_delete_seerorganizationsettings -sentry: 1064_eventattachment_date_expires_now +sentry: 1065_delete_customdynamicsamplingrule social_auth: 0003_social_auth_json_field diff --git a/src/sentry/db/router.py b/src/sentry/db/router.py index ab28c54a8ce733..d85b97e4a92de2 100644 --- a/src/sentry/db/router.py +++ b/src/sentry/db/router.py @@ -76,6 +76,8 @@ class SiloRouter: "sentry_alertruleactivations": SiloMode.CELL, "sentry_alertruleactivationcondition": SiloMode.CELL, "sentry_code_review_event": SiloMode.CELL, + "sentry_customdynamicsamplingrule": SiloMode.CELL, + "sentry_customdynamicsamplingruleproject": SiloMode.CELL, "sentry_dashboardwidgetsnapshot": SiloMode.CELL, "sentry_datasecrecywaiver": SiloMode.CELL, "sentry_incidentseen": SiloMode.CELL, diff --git a/src/sentry/migrations/1065_delete_customdynamicsamplingrule.py b/src/sentry/migrations/1065_delete_customdynamicsamplingrule.py new file mode 100644 index 00000000000000..766a2f61813730 --- /dev/null +++ b/src/sentry/migrations/1065_delete_customdynamicsamplingrule.py @@ -0,0 +1,22 @@ +from sentry.new_migrations.migrations import CheckedMigration +from sentry.new_migrations.monkey.models import SafeDeleteModel +from sentry.new_migrations.monkey.state import DeletionAction + + +class Migration(CheckedMigration): + is_post_deployment = False + + dependencies = [ + ("sentry", "1064_eventattachment_date_expires_now"), + ] + + operations = [ + SafeDeleteModel( + name="CustomDynamicSamplingRuleProject", + deletion_action=DeletionAction.DELETE, + ), + SafeDeleteModel( + name="CustomDynamicSamplingRule", + deletion_action=DeletionAction.DELETE, + ), + ]