
You don't need CompositePrimaryKeys
April 25, 2025
|
Articles
Django 5.2 adds CompositePrimaryKey support for legacy or sharded databases, but new models should avoid composite keys in favor of surrogate keys and unique constraints.
Filed in:
Articles

Sponsor Number One
Subscribe to Django News
Weekly Django news, articles, projects, and more. Curated by Jeff Triplett & William Vincent.
No spam, ever. We'll never share your email address and you can opt out at any time.