﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36564	Change DEFAULT_AUTO_FIELD to BigAutoField	Tim Graham	Tim Graham	"In Django 3.2, the `DEFAULT_AUTO_FIELD` setting and `AppConfig.default_auto_field` attribute were added to start nudging users from `AutoField` to `BigAutoField`.

The default `startproject` template has `DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'` and the default startapp template has `default_auto_field = ‘django.db.models.BigAutoField'` but `django.conf.global_settings` has `DEFAULT_AUTO_FIELD = ""django.db.models.AutoField""`.

Phase two of the plan is changing the `DEFAULT_AUTO_FIELD` in `django.conf.global_settings` to `BigAutoField`. Since there has has effectively been a quasi-deprecation warning generated by the system check framework since Django 3.2 if neither `DEFAULT_AUTO_FIELD` nor `AppConfig.default_auto_field` are set, I think no deprecation period is needed and we can make these changes in Django 6.0:

* Change `django.conf.global_settings.DEFAULT_AUTO_FIELD` from `AutoField` to `BigAutoField`.
* Remove `DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'` from the default project template.
* Remove `default_auto_field = 'django.db.models.BigAutoField'` from the default app template.
* Remove the system check that’s acted as a deprecation warning (example output below):

{{{
WARNINGS:
app_label.Model: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
    HINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
}}}

When [https://forum.djangoproject.com/t/changing-default-auto-field-to-bigautofield/42452 raised on the forum], the only concern is whether the fellows will have time to review the patch."	Cleanup/optimization	closed	Database layer (models, ORM)	dev	Normal	fixed		Alex	Ready for checkin	1	0	0	0	0	0
