#27038: Migration being created even when no change was made.
----------------------------+----------------------------
     Reporter:  rserrano    |      Owner:  nobody
         Type:  Bug         |     Status:  new
    Component:  Migrations  |    Version:  1.9
     Severity:  Normal      |   Keywords:  makemigrations
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0           |      UI/UX:  0
----------------------------+----------------------------
 I'm having a problem with migrations. They are being created by
 makemigrations even after no change has been made. I'm in my 57th
 migration so I can't create a simple way to reproduce the problem.

 My model is this:

 {{{#!python
 class Layer3d(Process):
     last_modified = models.DateTimeField(auto_now=True)
     info          = models.TextField(verbose_name=_('layer info'),
 default='{}')

 class Layer3dProjection(models.Model, Layer3dProjectionMixin):
     name     = models.CharField(verbose_name=_('name'), max_length=40,
 default='', validators=[name_regex], unique=True)
     llist    = models.ForeignKey(LayerList, verbose_name=_('layer list'))
     layer3d  = models.ForeignKey(Layer3d)
     distance = models.FloatField(default=-1)
     last_modified = models.DateTimeField(auto_now=True)

     class Meta:
         unique_together = (('llist', 'name'),)
         ordering = ['name']
 }}}

 This migration is being created, time after time, without modifying any
 model.

 {{{#!python
 # -*- coding: utf-8 -*-
 # Generated by Django 1.9.7 on 2016-08-09 00:50
 from __future__ import unicode_literals

 from django.db import migrations, models
 import django.db.models.deletion

 The migration being created is this.

 class Migration(migrations.Migration):

     dependencies = [
         ('studies', '0057_auto_20160809_0047'),
     ]

     operations = [
         migrations.AlterField(
             model_name='layer3dprojection',
             name='layer3d',
 field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
 to='studies.Layer3d'),
         ),
     ]
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27038>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.81bdaa44a1abe68786e63b987ce77c60%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to