-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(backup): Add ForeignKeyComparator #54558
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
Conversation
25b28a6
to
7eeea6b
Compare
48a9d15
to
ebb9fde
Compare
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
7eeea6b
to
225ff95
Compare
ebb9fde
to
fe35ff0
Compare
225ff95
to
e421f0e
Compare
fe35ff0
to
1e69cf7
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #54558 +/- ##
=======================================
Coverage 79.78% 79.78%
=======================================
Files 5000 5000
Lines 212243 212300 +57
Branches 36159 36173 +14
=======================================
+ Hits 169331 169388 +57
+ Misses 37707 37703 -4
- Partials 5205 5209 +4
|
Given two instances of a model that are being validated for equality, we want the foreign keys to be correct relatively (ie, they point to the same model in the respective models' JSON blobs), not absolutely (ie, they are literally the same integer). By creating maps that store the relations between pks and ordinals, we can easily check that the models point to match their respective ordinals regardless of the actual pk numbers. Issue: getsentry/team-ospo#171
1e69cf7
to
258c205
Compare
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.
This logic makes sense to me. Granted, I didn't know what the relationship between foreign keys and primary keys were before reviewing 😅
Given two instances of a model that are being validated for equality, we want the foreign keys to be correct relatively (ie, they point to the same model in the respective models' JSON blobs), not absolutely (ie, they are literally the same integer). By creating maps that store the relations between pks and ordinals, we can easily check that the models point to match their respective ordinals regardless of the actual pk numbers.
Issue: getsentry/team-ospo#171