diff --git a/posthog/migrations/0495_errortrackingsymbolset_errortrackingstackframe_and_more.py b/posthog/migrations/0495_errortrackingsymbolset_errortrackingstackframe_and_more.py deleted file mode 100644 index 8bb4007a4214c3..00000000000000 --- a/posthog/migrations/0495_errortrackingsymbolset_errortrackingstackframe_and_more.py +++ /dev/null @@ -1,68 +0,0 @@ -# Generated by Django 4.2.15 on 2024-10-22 15:47 - -from django.db import migrations, models -import django.db.models.deletion -import posthog.models.utils - - -class Migration(migrations.Migration): - dependencies = [ - ("posthog", "0494_team_project_non_null"), - ] - - operations = [ - migrations.CreateModel( - name="ErrorTrackingSymbolSet", - fields=[ - ( - "id", - models.UUIDField( - default=posthog.models.utils.UUIDT, editable=False, primary_key=True, serialize=False - ), - ), - ("ref", models.TextField()), - ("created_at", models.DateTimeField(auto_now_add=True)), - ("storage_method", models.TextField(choices=[("s3", "s3"), ("file", "file")], default="s3", null=True)), - ("storage_ptr", models.TextField(null=True)), - ("team", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="posthog.team")), - ], - ), - migrations.CreateModel( - name="ErrorTrackingStackFrame", - fields=[ - ( - "id", - models.UUIDField( - default=posthog.models.utils.UUIDT, editable=False, primary_key=True, serialize=False - ), - ), - ("raw_id", models.TextField()), - ("created_at", models.DateTimeField(auto_now_add=True)), - ("contents", models.JSONField()), - ("resolved", models.BooleanField()), - ( - "symbol_set", - models.ForeignKey( - null=True, on_delete=django.db.models.deletion.CASCADE, to="posthog.errortrackingsymbolset" - ), - ), - ("team", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="posthog.team")), - ], - ), - migrations.AddIndex( - model_name="errortrackingsymbolset", - index=models.Index(fields=["team_id", "id"], name="posthog_err_team_id_88810e_idx"), - ), - migrations.AddConstraint( - model_name="errortrackingsymbolset", - constraint=models.UniqueConstraint(fields=("team_id", "id"), name="unique_id_per_team"), - ), - migrations.AddIndex( - model_name="errortrackingstackframe", - index=models.Index(fields=["team_id", "raw_id"], name="posthog_err_team_id_dc6a7f_idx"), - ), - migrations.AddConstraint( - model_name="errortrackingstackframe", - constraint=models.UniqueConstraint(fields=("team_id", "raw_id"), name="unique_raw_id_per_team"), - ), - ] diff --git a/posthog/models/error_tracking/error_tracking.py b/posthog/models/error_tracking/error_tracking.py index 6869577e833774..7e4c625446520b 100644 --- a/posthog/models/error_tracking/error_tracking.py +++ b/posthog/models/error_tracking/error_tracking.py @@ -69,50 +69,3 @@ class ErrorTrackingIssueFingerprint(models.Model): class Meta: constraints = [models.UniqueConstraint(fields=["team", "fingerprint"], name="unique fingerprint for team")] - - -class ErrorTrackingSymbolSet(UUIDModel): - class StorageMethod(models.TextChoices): - S3 = "s3", "s3" - FILE = "file", "file" - - # Derived from the symbol set reference - ref = models.TextField(null=False, blank=False) - team = models.ForeignKey("Team", on_delete=models.CASCADE) - created_at = models.DateTimeField(auto_now_add=True) - - # How we stored this symbol set, and where to look for it - # These are null if we failed to find a symbol set for a given reference. We store a - # row anyway, so if someone comes along later and uploads a symbol set for this reference, - # we can know which frame resolution results below to drop. - storage_method = models.TextField(choices=StorageMethod.choices, default=StorageMethod.S3, null=True) - storage_ptr = models.TextField(null=True, blank=False) - - class Meta: - indexes = [ - models.Index(fields=["team_id", "id"]), - ] - - constraints = [ - models.UniqueConstraint(fields=["team_id", "id"], name="unique_id_per_team"), - ] - - -class ErrorTrackingStackFrame(UUIDModel): - # Produced by a raw frame - raw_id = models.TextField(null=False, blank=False) - team = models.ForeignKey("Team", on_delete=models.CASCADE) - created_at = models.DateTimeField(auto_now_add=True) - - symbol_set = models.ForeignKey("ErrorTrackingSymbolSet", on_delete=models.CASCADE, null=True) - contents = models.JSONField(null=False, blank=False) - resolved = models.BooleanField(null=False, blank=False) - - class Meta: - indexes = [ - models.Index(fields=["team_id", "raw_id"]), - ] - - constraints = [ - models.UniqueConstraint(fields=["team_id", "raw_id"], name="unique_raw_id_per_team"), - ]