#32697: Older versions of Django insist on converting BigAutoField back to
AutoField
-----------------------------------+--------------------------------------
Reporter: Alexander Todorov | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 3.2
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* resolution: => invalid
Comment:
> Since the release notes point out that in the future BigAutoField is to
be the default ...
First of all I would like to ensure you that this will not happen in the
nearest future (maybe never). I can not imagine that we would change that
before dropping support for all versions prior to 3.2.
> In our test suite when running with Django < 3.2 (e.g. 3.1.8)
makemigrations insists on reverting this field back to AutoField and it
creates the following 3rd migration -
attachments/migrations/0007_auto_20210429_0400.py:
That's because `AppConfig.default_auto_field` doesn't exist in Django <
3.1, so it cannot be taken into account.
I would recommend to keep `default_auto_field =
'django.db.models.AutoField'` until Django 3.2 becomes the minimal Django
supported by your package.
--
Ticket URL: <https://code.djangoproject.com/ticket/32697#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.f306a49f567a4515bca7cb0d283c19d1%40djangoproject.com.