Skip to content
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

Support natural keys for the models #122

Merged
merged 1 commit into from
May 9, 2024

Conversation

sergei-maertens
Copy link
Collaborator

Closes #103

Added support for natural keys for the cookie and cookie group models. This required adding another unique constraint, this time to the cookie model. A specific cookie within a group was already looked up by name and domain in the existing code, so this DB constraint confirms the usage. Duplicate data would not have yielded the expected results, but users may not be aware of it, so this is also a breaking change.

You can now dump and load fixtures for cookie consent, using these natural keys and avoid database primary key conflicts.

Added support for natural keys for the cookie and cookie group
models. This required adding another unique constraint, this
time to the cookie model. A specific cookie within a group was
already looked up by name and domain in the existing code, so
this DB constraint confirms the usage. Duplicate data would not
have yielded the expected results, but users may not be aware
of it, so this is also a breaking change.

You can now dump and load fixtures for cookie consent, using
these natural keys and avoid database primary key conflicts.
Copy link

codecov bot commented May 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.09%. Comparing base (6c37cf0) to head (13aa8c3).
Report is 19 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #122      +/-   ##
==========================================
- Coverage   96.03%   90.09%   -5.95%     
==========================================
  Files          11       11              
  Lines         404      414      +10     
  Branches       52       68      +16     
==========================================
- Hits          388      373      -15     
- Misses         11       36      +25     
  Partials        5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sergei-maertens sergei-maertens merged commit b1c9518 into master May 9, 2024
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate with Django's dumpdata command via natural primary/foreign key
1 participant