On Mon, Dec 5, 2022 at 8:54 PM Mark Sapiro <mark@msapiro.net> wrote:
On 12/5/22 02:37, Odhiambo Washington wrote:
Here again, Google-fu came to the rescue. I added the following line to settings_local.py and the warnings were suppressed. DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' I need to understand how this affects everything and how this is likely
to
impact the functionality of MM3. What is the proper solution for this? And should it be django.db.models.BigAutoField or django.db.models.AutoField? Which is which?
Prior to Django 3.2 Django set default primary keys to 32 bit integers. In 3.2 Django introduced the possibility to set default primary keys to 64 bit integers by setting the type to django.db.models.BigAutoField.
Thus, putting
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
in your settings will maintain compatibility with pre 3.2 versions and existing tables and this is the correct thing to do.
Thank you very much for the clarification.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)