From b8241aced1944c0c120a349f03d7e9c155f75f55 Mon Sep 17 00:00:00 2001 From: getsentry-bot Date: Fri, 15 Sep 2023 18:58:48 +0000 Subject: [PATCH] Revert "feat(escalating-issues): Create new index on Group for more efficient query (#56180)" This reverts commit 381818a92e0daed5a3a083267352ace9759401ef. Co-authored-by: NisanthanNanthakumar <10491193+NisanthanNanthakumar@users.noreply.github.com> --- migrations_lockfile.txt | 2 +- ...3_add_new_index_to_groupedmessage_table.py | 39 ------------------- src/sentry/models/group.py | 1 - 3 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 src/sentry/migrations/0553_add_new_index_to_groupedmessage_table.py diff --git a/migrations_lockfile.txt b/migrations_lockfile.txt index 09be0e07f83b43..8276c0c589bd59 100644 --- a/migrations_lockfile.txt +++ b/migrations_lockfile.txt @@ -8,5 +8,5 @@ will then be regenerated, and you should be able to merge without conflicts. feedback: 0002_feedback_add_org_id_and_rename_event_id nodestore: 0002_nodestore_no_dictfield replays: 0003_add_size_to_recording_segment -sentry: 0553_add_new_index_to_groupedmessage_table +sentry: 0552_create_neglectedalert_table social_auth: 0002_default_auto_field diff --git a/src/sentry/migrations/0553_add_new_index_to_groupedmessage_table.py b/src/sentry/migrations/0553_add_new_index_to_groupedmessage_table.py deleted file mode 100644 index 964c5dabf40dcc..00000000000000 --- a/src/sentry/migrations/0553_add_new_index_to_groupedmessage_table.py +++ /dev/null @@ -1,39 +0,0 @@ -# Generated by Django 3.2.20 on 2023-09-14 18:02 - -from django.db import migrations - -from sentry.new_migrations.migrations import CheckedMigration - - -class Migration(CheckedMigration): - # This flag is used to mark that a migration shouldn't be automatically run in production. For - # the most part, this should only be used for operations where it's safe to run the migration - # after your code has deployed. So this should not be used for most operations that alter the - # schema of a table. - # Here are some things that make sense to mark as dangerous: - # - Large data migrations. Typically we want these to be run manually by ops so that they can - # be monitored and not block the deploy for a long period of time while they run. - # - Adding indexes to large tables. Since this can take a long time, we'd generally prefer to - # have ops run this and not block the deploy. Note that while adding an index is a schema - # change, it's completely safe to run the operation after the code has deployed. - is_dangerous = False - - dependencies = [ - ("sentry", "0552_create_neglectedalert_table"), - ] - - operations = [ - migrations.AlterIndexTogether( - name="group", - index_together={ - ("project", "status", "substatus", "type", "last_seen", "id"), - ("project", "status", "substatus", "last_seen", "id"), - ("status", "substatus", "id"), - ("project", "status", "substatus", "id"), - ("project", "first_release"), - ("project", "status", "last_seen", "id"), - ("project", "id"), - ("project", "status", "type", "last_seen", "id"), - }, - ), - ] diff --git a/src/sentry/models/group.py b/src/sentry/models/group.py index 434c3f902bc3f4..8e0091b98bfc9a 100644 --- a/src/sentry/models/group.py +++ b/src/sentry/models/group.py @@ -544,7 +544,6 @@ class Meta: ("project", "status", "substatus", "last_seen", "id"), ("project", "status", "substatus", "type", "last_seen", "id"), ("project", "status", "substatus", "id"), - ("status", "substatus", "id"), ] unique_together = ( ("project", "short_id"),