ietf-tools / datatracker

The day-to-day front-end to the IETF database for people who work on IETF standards.
https://datatracker.ietf.org
BSD 3-Clause "New" or "Revised" License
607 stars 372 forks source link

Migrate Email model to use surrogate primary key #8176

Open jennifer-richards opened 5 days ago

jennifer-richards commented 5 days ago

Description

The Email model currently uses its address field as a primary key. We should migrate this to use a numeric surrogate primary key instead. A database-level uniqueness constraint on the address field must continue to be enforced.

Code of Conduct

jennifer-richards commented 5 days ago

fyi, the immediate motivation for this is to ease use of django-rest-framework, which does not handle @ characters in PKs out of the box