﻿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
26521	CreateModel allows duplicate field names	w0rp	nobody	"I hit this bug while manually editing a migration file after squashing files. If you define the same field twice in a list of fields for CreateModel, then migrate will take the second field definition without reporting any errors. 

{{{#!python
class Migration(migrations.Migration):
    operations = [
        migrations.CreateModel(
            name='Foo',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('created', models.DateTimeField(auto_now_add=True, db_index=True)),
                # This one will be used.
                ('created', models.DateField(auto_now_add=True, db_index=True)),
            ],
        ),
    ]
}}}

I think the migration code should check for duplicate fields, and then report an error if you have mistakenly defined the same field twice for the fields array."	Cleanup/optimization	closed	Migrations	dev	Normal	fixed			Accepted	1	0	0	1	0	0
