#32834: DEFAULT_AUTO_FIELD should allow for diable migration for existing models
-------------------------------------+-------------------------------------
               Reporter:  qiu-lijie  |          Owner:  nobody
                   Type:  New        |         Status:  new
  feature                            |
              Component:             |        Version:  3.2
  Migrations                         |
               Severity:  Normal     |       Keywords:  DEFAULT_AUTO_FIELD
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 DEFAULT_AUTO_FIELD new in 3.2 will change existing models' pk to
 BigAutoField, as BigAutoField is the default for new projects. I believe
 there should be an option to disable this behaviour, i.e., not migrate
 existing models to BigAutoField. While I understand Django wants to move
 away AutoField and towards BigAutoField for pk, the current behaviour will
 make migrations for third-party apps, which is not desirable. Ideally, all
 third-party apps would also migrate their own models to use BigAutoField,
 but we all know that some don't get maintained as much, see examples
 below.

 {{{
 Migrations for 'account':
   /usr/local/lib/python3.8/site-
 packages/allauth/account/migrations/0003_auto_20210610_0705.py
     - Alter field id on emailaddress
     - Alter field id on emailconfirmation
 Migrations for 'cities_light':
   /usr/local/lib/python3.8/site-
 packages/cities_light/migrations/0011_auto_20210610_0705.py
     - Alter field id on city
     - Alter field id on country
     - Alter field id on region
     - Alter field id on subregion
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32834>
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/052.deb230eac8cb60db30a1b781673bd8f1%40djangoproject.com.

Reply via email to