Closed marcosox closed 3 years ago
From Django 3.2 new models are now generated by default with BigAutoField IDs instead of AutoField, as written in the release notes.
BigAutoField
AutoField
This breaks the support for natural keys when using a single unique field in the model, because this check inside get_natural_key_def() now fails.
unique
get_natural_key_def()
I can write a PR which checks for BigAutoField too, but I don't know if someone can come up with a more generalized method.
See #17 for the proposed fix
Thanks, this fix is good for now.
From Django 3.2 new models are now generated by default with
BigAutoField
IDs instead ofAutoField
, as written in the release notes.This breaks the support for natural keys when using a single
unique
field in the model, because this check insideget_natural_key_def()
now fails.I can write a PR which checks for
BigAutoField
too, but I don't know if someone can come up with a more generalized method.