[Django]-What should be the default value for a not Null Unique field

7👍

Add the field with null=True, and create a migration. Then add a data migration to populate the field. Finally, set null=False and create a final migration to add the NOT NULL constraint.

Leave a comment