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
619 stars 386 forks source link

Migrate Email model to use surrogate primary key #8176

Open jennifer-richards opened 2 weeks ago

jennifer-richards commented 2 weeks 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 2 weeks 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