﻿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
22837	Migrations detect unnessecary(?) changes	Vidir Valberg Gudmundsson	nobody	"I don't know if this is intended behavior, but having a simple model as:

{{{
class Foo(models.Model):
    bar = models.SlugField()
}}}

Simple changes, that do have no impact on the database representation, result in new migrations. For instance:

{{{
class Foo(models.Model):
    bar = models.SlugField(editable=False)
}}}

results in:

{{{
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

    dependencies = [
        ('testapp', '0001_initial'),
    ]

    operations = [
        migrations.AlterField(
            model_name='foo',
            name='bar',
            field=models.SlugField(editable=False),
        ),
    ]
}}}

And further:

{{{
class Foo(models.Model):
    bar = models.SlugField(
        editable=False,
        choices=[
            ('baz', 'Baz'),
            ('test', 'Test'),
        ]
    )
}}}

Results in:

{{{
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

    dependencies = [
        ('testapp', '0002_auto_20140614_2237'),
    ]

    operations = [
        migrations.AlterField(
            model_name='foo',
            name='bar',
            field=models.SlugField(editable=False, choices=[('baz', 'Baz'), ('test', 'Test')]),
        ),
    ]
}}}

It is as if the detector does ""too much"" detecting. But again there might well be a good reason for this. Just thought it would be a good thing to address :)"	Uncategorized	closed	Migrations	1.7-beta-2	Normal	invalid		josh.smeaton@…	Unreviewed	0	0	0	0	0	0
