﻿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
34382	DEFAULT_AUTO_FIELD ignored for new models	Alberto Donato	nobody	"Setting the value of `DEFAULT_AUTO_FIELD` to e.g. `AutoField` seems to be ignored when generating migrations for new models.

A simple reproducer is to create a new project, change the setting as follows:

{{{
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' 
}}}

and adding a simple model such as:

{{{
class SampleModel(models.Model):
    name = models.TextField(unique=True)
}}}


After running `./manage.py makemigrations` the following migration is generated:

{{{
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='SampleModel',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(unique=True)),
            ],
        ),
    ]
}}}


Same behavior can be reproduced both in 3.2 and 4.1.7."	Uncategorized	closed	Database layer (models, ORM)	3.2	Normal	invalid			Unreviewed	0	0	0	0	0	0
