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

Remove PKs from tag fixture now that we have natural keys for them #2320

Merged
merged 3 commits into from Sep 9, 2022

Conversation

glennmatthews
Copy link
Contributor

@glennmatthews glennmatthews commented Aug 26, 2022

Relates-to #1574

What's Changed

Add slug as a natural-key for Tag. Though it occurs to me we might need to revisit this depending on what we decide in #2312.

This is a PR atop #2281 and #2360 since the latter allows me to remove the UUID PKs from the Tag fixture file.

@glennmatthews
Copy link
Contributor Author

@lampwins Should I change this (and/or the Status natural-keys support as well) to use name instead of slug as the key?

Base automatically changed from gfm-fixtures-infra to next August 29, 2022 20:24
@lampwins
Copy link
Member

@glennmatthews because TagBase.name is unique, I would say yes because name is already a true natural key.

Incidentally, in double checking that in the taggit code, their handling of the slug field is a prime example of one of the reasons I truly believe slugs are almost never natural keys. I'll post my thoughts on #2312 :)

@glennmatthews glennmatthews changed the title Add natural-key support for tags Add natural-key support for tags, change status natural-key to name instead of slug Sep 1, 2022
@glennmatthews
Copy link
Contributor Author

It might make sense to target this to develop instead, actually, since natural-keys for Status were added in 1.4.1. Thoughts?

@glennmatthews glennmatthews self-assigned this Sep 1, 2022
@glennmatthews glennmatthews changed the title Add natural-key support for tags, change status natural-key to name instead of slug [next] Add natural-key support for tags, change status natural-key to name instead of slug Sep 2, 2022
@glennmatthews glennmatthews changed the title [next] Add natural-key support for tags, change status natural-key to name instead of slug Remove PKs from tag fixture now that we have natural keys for them Sep 7, 2022
@glennmatthews glennmatthews merged commit aac0812 into next Sep 9, 2022
@glennmatthews glennmatthews deleted the gfm-tag-natural-keys branch September 9, 2022 13:03
glennmatthews added a commit that referenced this pull request Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants