Skip to content

Commit

Permalink
remove postgres changes
Browse files Browse the repository at this point in the history
  • Loading branch information
daibhin committed Oct 28, 2024
1 parent dacf398 commit 82c95b5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 115 deletions.

This file was deleted.

47 changes: 0 additions & 47 deletions posthog/models/error_tracking/error_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
]

0 comments on commit 82c95b5

Please sign in to comment.