diff --git a/migrations_lockfile.txt b/migrations_lockfile.txt index ef4bce116ddc..2d2931d45f66 100644 --- a/migrations_lockfile.txt +++ b/migrations_lockfile.txt @@ -41,7 +41,7 @@ seer: 0046_add_workflow_config_backing_workflow seer_workflow_outputs: 0001_initial -sentry: 1258_artifactbundleindex_drop_organization_id_index +sentry: 1259_add_projectartifactbundle_has_debug_ids service_accounts: 0007_add_service_account_token_replica diff --git a/src/sentry/migrations/1259_add_projectartifactbundle_has_debug_ids.py b/src/sentry/migrations/1259_add_projectartifactbundle_has_debug_ids.py new file mode 100644 index 000000000000..69668ae4a101 --- /dev/null +++ b/src/sentry/migrations/1259_add_projectartifactbundle_has_debug_ids.py @@ -0,0 +1,33 @@ +# Generated by Django 5.2.17 on 2026-11-10 15:09 + +from django.db import migrations, models + +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", "1258_artifactbundleindex_drop_organization_id_index"), + ] + + operations = [ + migrations.AddField( + model_name="projectartifactbundle", + name="has_debug_ids", + field=models.BooleanField(db_default=False), + ), + ] diff --git a/src/sentry/models/artifactbundle.py b/src/sentry/models/artifactbundle.py index 3f03695d78d0..df3a5495f2ab 100644 --- a/src/sentry/models/artifactbundle.py +++ b/src/sentry/models/artifactbundle.py @@ -209,6 +209,7 @@ class ProjectArtifactBundle(Model): organization_id = BoundedBigIntegerField(db_index=True) project_id = BoundedBigIntegerField() artifact_bundle = FlexibleForeignKey("sentry.ArtifactBundle") + has_debug_ids = models.BooleanField(db_default=False) date_added = models.DateTimeField(default=timezone.now) class Meta: