Skip to content
All lessons

Tech Insights· docs.djangoproject.com

If you want to add a unique non-nullable field to a table with existent rows, you'll need to a few extra steps because **Djan...

If you want to add a unique non-nullable field to a table with existent rows, you'll need to a few extra steps because Django generates the value to populate existent rows only once. For the extra steps, check these instructions in #migrations-that-add-unique-fields

Shared by

Read on docs.djangoproject.com
  • Django
  • Migrations

Book a call

Lessons like this one
shape how we build.

Tell us what you’re building. In one call, we’ll show you how our team would approach it.

Tell us what you’re building, and we’ll show you how we’d approach it.

Still prefer the good old email? Contact us