diff --git a/migrations_lockfile.txt b/migrations_lockfile.txt index 7e67527969a493..92c74f0f23cd39 100644 --- a/migrations_lockfile.txt +++ b/migrations_lockfile.txt @@ -31,7 +31,7 @@ releases: 0003_real_delete_dual_written_commit_tables replays: 0006_add_bulk_delete_job -sentry: 1003_group_history_prev_history_safe_removal +sentry: 1004_remove_group_project_short_id_unique_constraint social_auth: 0003_social_auth_json_field diff --git a/src/sentry/migrations/1004_remove_group_project_short_id_unique_constraint.py b/src/sentry/migrations/1004_remove_group_project_short_id_unique_constraint.py new file mode 100644 index 00000000000000..de80acade1cb90 --- /dev/null +++ b/src/sentry/migrations/1004_remove_group_project_short_id_unique_constraint.py @@ -0,0 +1,32 @@ +# Generated by Django 5.2.1 on 2025-11-10 12:30 + +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. + # 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 post deployment: + # - Large data migrations. Typically we want these to be run manually 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 + # run this outside deployments so that we don't block them. Note that while adding an index + # is a schema change, it's completely safe to run the operation after the code has deployed. + # Once deployed, run these manually via: https://develop.sentry.dev/database-migrations/#migration-deployment + + is_post_deployment = False + + dependencies = [ + ("sentry", "1003_group_history_prev_history_safe_removal"), + ] + + operations = [ + migrations.AlterUniqueTogether( + name="group", + unique_together=set(), + ), + ] diff --git a/src/sentry/models/group.py b/src/sentry/models/group.py index 14a37a54ab7e64..8e51bf0eeb5168 100644 --- a/src/sentry/models/group.py +++ b/src/sentry/models/group.py @@ -692,7 +692,6 @@ class Meta: models.Index(fields=("status", "substatus", "first_seen")), models.Index(fields=("project", "status", "priority", "last_seen", "id")), ] - unique_together = (("project", "short_id"),) __repr__ = sane_repr("project_id")