-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: create issue fingerprint table in postgres #25690
Merged
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4a7da86
chore: create issue fingerprint table in postgres
daibhin bd84ab3
remove migration file
daibhin 5534d2a
Merge branch 'master' into dn-chore/create-issue-fingerprint-table
daibhin 54d427d
non nullable, default
daibhin d42688c
Merge branch 'master' into dn-chore/create-issue-fingerprint-table
daibhin 73d9d00
textfield
daibhin e6e69f0
Merge branch 'master' into dn-chore/create-issue-fingerprint-table
daibhin 5d96143
update dependency
daibhin 6d65757
fix latest migrations
daibhin a79d170
Merge branch 'master' into dn-chore/create-issue-fingerprint-table
daibhin 95cd74c
fix merges
daibhin 885eda7
update files
daibhin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
posthog/migrations/0494_errortrackingissuefingerprint_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Generated by Django 4.2.15 on 2024-10-18 15:56 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("posthog", "0493_insightvariable_values"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="ErrorTrackingIssueFingerprint", | ||
fields=[ | ||
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), | ||
("fingerprint", models.CharField(max_length=400)), | ||
("version", models.BigIntegerField(blank=True, null=True)), | ||
( | ||
"issue", | ||
models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="posthog.errortrackinggroup"), | ||
), | ||
( | ||
"team", | ||
models.ForeignKey(db_index=False, on_delete=django.db.models.deletion.CASCADE, to="posthog.team"), | ||
), | ||
], | ||
), | ||
migrations.AddConstraint( | ||
model_name="errortrackingissuefingerprint", | ||
constraint=models.UniqueConstraint(fields=("team", "fingerprint"), name="unique fingerprint for team"), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going with a string here. I know fingerprints are arrays of strings right now but I feel like the intention is to move towards a proper hash that will be stored as a string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's correct, yeah.... although I don't know that setting a 400 character limit on it is a good idea. We want a postgres TEXT field here I think (unless this is a constraint coming from clickhouse?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
400 is a "magic number" dotted around our codebase whose significance I don't understand.