[Django] #29123: Generated migration orders Add/Remove Field incorrectly, causing OperationalError

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[Django] #29123: Generated migration orders Add/Remove Field incorrectly, causing OperationalError

Django
#29123: Generated migration orders Add/Remove Field incorrectly, causing
OperationalError
--------------------------------------+------------------------
               Reporter:  Ed Morley   |          Owner:  nobody
                   Type:  Bug         |         Status:  new
              Component:  Migrations  |        Version:  master
               Severity:  Normal      |       Keywords:
           Triage Stage:  Unreviewed  |      Has patch:  0
    Needs documentation:  0           |    Needs tests:  0
Patch needs improvement:  0           |  Easy pickings:  0
                  UI/UX:  0           |
--------------------------------------+------------------------
 Replacing an integer field with a foreign key of the same name, results in
 an `OperationalError` when creating/applying the migration.

 This affects Django master + v1.11.10, and both the SQLite and MySQL
 backends (others not tested).

 == STR:
 1. Git clone `https://github.com/edmorley/django-migration-int-to-fk-
 testcase`
 2. `pip install https://github.com/django/django/archive/master.zip`
 3. `./manage.py migrate`
 4. `cp testapp/models_new.py testapp/models.py`
 5. `./manage.py makemigrations --name broken_migration`
 6. `./manage.py migrate`

 == Expected:

 New migration is created/applied successfully, which converts from the
 [https://github.com/edmorley/django-migration-int-to-fk-
 testcase/blob/master/testapp/models.py original model] to the
 [https://github.com/edmorley/django-migration-int-to-fk-
 testcase/blob/master/testapp/models_new.py new model].

 == Actual:

 The new `0002_broken_migration.py` migration incorrectly lists the
 `AddField`
 operation before the `RemoveField` operation...

 {{{#!python
     operations = [
         migrations.AddField(
             model_name='bar',
             name='foo',
             field=models.ForeignKey(null=True,
 on_delete=django.db.models.deletion.CASCADE, to='testapp.Foo'),
         ),
         migrations.RemoveField(
             model_name='bar',
             name='foo_id',
         ),
         migrations.AlterUniqueTogether(
             name='bar',
             unique_together={('name', 'foo')},
         ),
     ]
 }}}

 Which results in an exception at step 6...

 {{{#!bash
 $ ./manage.py migrate
 Operations to perform:
   Apply all migrations: admin, auth, contenttypes, sessions, testapp
 Running migrations:
   Applying testapp.0002_broken_migration...Traceback (most recent call
 last):
   File "/c/Users/Ed/.virtualenvs/django-master/lib/python3.6/site-
 packages/django/db/backends/utils.py", line 83, in _execute
     return self.cursor.execute(sql)
   File "/c/Users/Ed/.virtualenvs/django-master/lib/python3.6/site-
 packages/django/db/backends/sqlite3/base.py", line 290, in execute
     return Database.Cursor.execute(self, query)
 sqlite3.OperationalError: duplicate column name: foo_id
 }}}

 == Additional notes:
 * Without the `unique_together` on model `Bar`, the bug does not occur.
 * This affects both the SQLite backend and the MySQL backend (others not
 tested).
 * At time of testing, django master was at revision
 `6d794fb76212bb8a62fe2cd97cff173054e1c626`.

--
Ticket URL: <https://code.djangoproject.com/ticket/29123>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.3d92332812116f357e826b0d781535cf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29123: Generated migration orders Add/Remove Field incorrectly, causing OperationalError

Django
#29123: Generated migration orders Add/Remove Field incorrectly, causing
OperationalError
----------------------------+--------------------------------------
     Reporter:  Ed Morley   |                    Owner:  nobody
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  master
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Unreviewed
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+--------------------------------------
Description changed by Ed Morley:

Old description:

> Replacing an integer field with a foreign key of the same name, results
> in an `OperationalError` when creating/applying the migration.
>
> This affects Django master + v1.11.10, and both the SQLite and MySQL
> backends (others not tested).
>
> == STR:
> 1. Git clone `https://github.com/edmorley/django-migration-int-to-fk-
> testcase`
> 2. `pip install https://github.com/django/django/archive/master.zip`
> 3. `./manage.py migrate`
> 4. `cp testapp/models_new.py testapp/models.py`
> 5. `./manage.py makemigrations --name broken_migration`
> 6. `./manage.py migrate`
>
> == Expected:
>
> New migration is created/applied successfully, which converts from the
> [https://github.com/edmorley/django-migration-int-to-fk-
> testcase/blob/master/testapp/models.py original model] to the
> [https://github.com/edmorley/django-migration-int-to-fk-
> testcase/blob/master/testapp/models_new.py new model].
>
> == Actual:
>
> The new `0002_broken_migration.py` migration incorrectly lists the
> `AddField`
> operation before the `RemoveField` operation...
>
> {{{#!python
>     operations = [
>         migrations.AddField(
>             model_name='bar',
>             name='foo',
>             field=models.ForeignKey(null=True,
> on_delete=django.db.models.deletion.CASCADE, to='testapp.Foo'),
>         ),
>         migrations.RemoveField(
>             model_name='bar',
>             name='foo_id',
>         ),
>         migrations.AlterUniqueTogether(
>             name='bar',
>             unique_together={('name', 'foo')},
>         ),
>     ]
> }}}
>
> Which results in an exception at step 6...
>
> {{{#!bash
> $ ./manage.py migrate
> Operations to perform:
>   Apply all migrations: admin, auth, contenttypes, sessions, testapp
> Running migrations:
>   Applying testapp.0002_broken_migration...Traceback (most recent call
> last):
>   File "/c/Users/Ed/.virtualenvs/django-master/lib/python3.6/site-
> packages/django/db/backends/utils.py", line 83, in _execute
>     return self.cursor.execute(sql)
>   File "/c/Users/Ed/.virtualenvs/django-master/lib/python3.6/site-
> packages/django/db/backends/sqlite3/base.py", line 290, in execute
>     return Database.Cursor.execute(self, query)
> sqlite3.OperationalError: duplicate column name: foo_id
> }}}
>
> == Additional notes:
> * Without the `unique_together` on model `Bar`, the bug does not occur.
> * This affects both the SQLite backend and the MySQL backend (others not
> tested).
> * At time of testing, django master was at revision
> `6d794fb76212bb8a62fe2cd97cff173054e1c626`.
New description:

 Replacing an integer field with a foreign key of the same name, results in
 an `OperationalError` when creating/applying the migration.

 This affects Django master + v1.11.10, and both the SQLite and MySQL
 backends (others not tested).

 == STR:
 1. Git clone [https://github.com/edmorley/django-migration-int-to-fk-
 testcase https://github.com/edmorley/django-migration-int-to-fk-testcase]
 2. `pip install https://github.com/django/django/archive/master.zip`
 3. `./manage.py migrate`
 4. `cp testapp/models_new.py testapp/models.py`
 5. `./manage.py makemigrations --name broken_migration`
 6. `./manage.py migrate`

 == Expected:

 New migration is created/applied successfully, which converts from the
 [https://github.com/edmorley/django-migration-int-to-fk-
 testcase/blob/master/testapp/models.py original model] to the
 [https://github.com/edmorley/django-migration-int-to-fk-
 testcase/blob/master/testapp/models_new.py new model].

 == Actual:

 The new `0002_broken_migration.py` migration incorrectly lists the
 `AddField` operation before the `RemoveField` operation...

 {{{#!python
     operations = [
         migrations.AddField(
             model_name='bar',
             name='foo',
             field=models.ForeignKey(null=True,
 on_delete=django.db.models.deletion.CASCADE, to='testapp.Foo'),
         ),
         migrations.RemoveField(
             model_name='bar',
             name='foo_id',
         ),
         migrations.AlterUniqueTogether(
             name='bar',
             unique_together={('name', 'foo')},
         ),
     ]
 }}}

 Which results in an exception at step 6...

 {{{#!bash
 $ ./manage.py migrate
 Operations to perform:
   Apply all migrations: admin, auth, contenttypes, sessions, testapp
 Running migrations:
   Applying testapp.0002_broken_migration...Traceback (most recent call
 last):
   File ".../site-packages/django/db/backends/utils.py", line 83, in
 _execute
     return self.cursor.execute(sql)
   File ".../site-packages/django/db/backends/sqlite3/base.py", line 290,
 in execute
     return Database.Cursor.execute(self, query)
 sqlite3.OperationalError: duplicate column name: foo_id
 }}}

 == Additional notes:
 * Without the `unique_together` on model `Bar`, the bug does not occur.
 * This affects both the SQLite backend and the MySQL backend (others not
 tested).
 * At time of testing, django master was at revision
 `6d794fb76212bb8a62fe2cd97cff173054e1c626`.
 * The above was using Python 3.6.2.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/29123#comment:1>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.f25229a804921bf422931b6b2b09b089%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered migration operations if the field is in unique_together (was: Generated migration orders Add/Remove Field incorrectly, causing OperationalError)

Django
In reply to this post by Django
#29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered
migration operations if the field is in unique_together
----------------------------+------------------------------------
     Reporter:  Ed Morley   |                    Owner:  nobody
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  master
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------
Changes (by Tim Graham):

 * stage:  Unreviewed => Accepted


Comment:

 I didn't attempt to reproduce but the report looks credible.

--
Ticket URL: <https://code.djangoproject.com/ticket/29123#comment:2>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.b81ed86fa5bb6d96d079f2bf4b21f4a3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered migration operations if the field is in unique_together

Django
In reply to this post by Django
#29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered
migration operations if the field is in unique_together
----------------------------+-------------------------------------------
     Reporter:  Ed Morley   |                    Owner:  Bhavesh Praveen
         Type:  Bug         |                   Status:  assigned
    Component:  Migrations  |                  Version:  master
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+-------------------------------------------
Changes (by Bhavesh Praveen):

 * owner:  nobody => Bhavesh Praveen
 * status:  new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/29123#comment:3>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.6ad69f5e0a8d73b9cd90e5bf07c29f02%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered migration operations if the field is in unique_together

Django
In reply to this post by Django
#29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered
migration operations if the field is in unique_together
----------------------------+------------------------------------
     Reporter:  Ed Morley   |                    Owner:  (none)
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  master
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------
Changes (by Bhavesh Praveen):

 * status:  assigned => new
 * owner:  Bhavesh Praveen => (none)


--
Ticket URL: <https://code.djangoproject.com/ticket/29123#comment:4>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.2d5619f05b6522bd13813b0c7561ce7c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered migration operations if the field is in unique_together

Django
In reply to this post by Django
#29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered
migration operations if the field is in unique_together
----------------------------+------------------------------------
     Reporter:  Ed Morley   |                    Owner:  Jeff
         Type:  Bug         |                   Status:  assigned
    Component:  Migrations  |                  Version:  master
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------
Changes (by Jeff):

 * owner:  nobody => Jeff
 * status:  new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/29123#comment:3>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.8ccbdadc0db8692db3decbb40feba46c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered migration operations if the field is in unique_together

Django
In reply to this post by Django
#29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered
migration operations if the field is in unique_together
----------------------------+------------------------------------
     Reporter:  Ed Morley   |                    Owner:  Jeff
         Type:  Bug         |                   Status:  assigned
    Component:  Migrations  |                  Version:  master
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------

Comment (by Jeff):

 I was able to reproduce and am starting work.

--
Ticket URL: <https://code.djangoproject.com/ticket/29123#comment:4>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.50c5bb3a92be1fa66672d4064470e96e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered migration operations if the field is in unique_together

Django
In reply to this post by Django
#29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered
migration operations if the field is in unique_together
----------------------------+------------------------------------
     Reporter:  Ed Morley   |                    Owner:  Jeff
         Type:  Bug         |                   Status:  assigned
    Component:  Migrations  |                  Version:  master
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------

Comment (by Jeff):

 It looks like the example migrations provided are exposing two separate
 issues.

 1) improperly ordered AddField/RemoveField/AlterUniqueTogether. Below is
 the initial migration

 Original Models:
 {{{
     class Foo(models.Model):
         pass


     class Bar(models.Model):
         name = models.CharField(max_length=50)
         foo_id = models.PositiveIntegerField()

         class Meta:
             unique_together = ('name', 'foo_id')
 }}}

 Updated Models:
 {{{
     class Foo(models.Model):
         pass


     class Bar(models.Model):
         name = models.CharField(max_length=
         baz = models.ForeignKey(Foo, models.CASCADE, null=True)

         class Meta:
             unique_together = ('name', 'baz')
 }}}

 This produces the problematic migration:
 {{{
     class Migration(migrations.Migration):

         dependencies = [
             ('temp', '0001_initial'),
         ]

         operations = [
             migrations.AddField(
                 model_name='bar',
                 name='baz',
                 field=models.ForeignKey(null=True,
 on_delete=django.db.models.deletion.CASCADE, to='temp.Foo'),
             ),
             migrations.RemoveField(
                 model_name='bar',
                 name='foo_id',
             ),
             migrations.AlterUniqueTogether(
                 name='bar',
                 unique_together={('name', 'baz')},
             ),
         ]
 }}}

 Instead of this functional migration:
 {{{
     class Migration(migrations.Migration):

         dependencies = [
             ('temp', '0001_initial'),
         ]

         operations = [
             migrations.AddField(
                 model_name='bar',
                 name='baz',
                 field=models.ForeignKey(null=True,
 on_delete=django.db.models.deletion.CASCADE, to='temp.Foo'),
             ),
             migrations.AlterUniqueTogether(
                 name='bar',
                 unique_together={('name', 'baz')},
             ),
             migrations.RemoveField(
                 model_name='bar',
                 name='foo_id',
             ),
         ]
 }}}

 and 2) problematic behavior around the clashing of names like `foo` with
 `foo_id`.

 I believe the given examples somewhat conflated these two separate issues,
 while I believe 1) is a bug and should be fixed, the I believe 2) is
 working as intended.
 Please advise if I am incorrect on this assumption.

--
Ticket URL: <https://code.djangoproject.com/ticket/29123#comment:5>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.e0a16fdd40b1aae216c47195ed434370%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered migration operations if the field is in unique_together

Django
In reply to this post by Django
#29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered
migration operations if the field is in unique_together
----------------------------+------------------------------------
     Reporter:  Ed Morley   |                    Owner:  Jeff
         Type:  Bug         |                   Status:  assigned
    Component:  Migrations  |                  Version:  master
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------

Comment (by Jeff):

 I have tracked down the issue to the migration optimization. Debugging now
 to determine how to ensure a field cannot be removed while it is a part of
 a `unique_together` constraint.

--
Ticket URL: <https://code.djangoproject.com/ticket/29123#comment:6>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.3847ff34729139d1b50af38c0d131d4f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered migration operations if the field is in unique_together

Django
In reply to this post by Django
#29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered
migration operations if the field is in unique_together
----------------------------+------------------------------------
     Reporter:  Ed Morley   |                    Owner:  Jeff
         Type:  Bug         |                   Status:  assigned
    Component:  Migrations  |                  Version:  master
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------

Comment (by Ramiro Morales):

 Looks suspiciously similar or at least related to #28862.

--
Ticket URL: <https://code.djangoproject.com/ticket/29123#comment:7>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.484c839d8d532f57bc0c7064df2f53ff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered migration operations if the field is in unique_together

Django
In reply to this post by Django
#29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered
migration operations if the field is in unique_together
----------------------------+------------------------------------
     Reporter:  Ed Morley   |                    Owner:  Jeff
         Type:  Bug         |                   Status:  assigned
    Component:  Migrations  |                  Version:  master
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------

Comment (by Jeff):

 Thanks for the tip, I do believe it to be the same issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/29123#comment:8>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.e07ff956c5d15fee3b587df2fbe8d8b6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered migration operations if the field is in unique_together

Django
In reply to this post by Django
#29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered
migration operations if the field is in unique_together
----------------------------+------------------------------------
     Reporter:  Ed Morley   |                    Owner:  (none)
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  master
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------
Changes (by Jeff):

 * owner:  Jeff => (none)
 * status:  assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/29123#comment:9>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.5da6418e71d714510cefd8c9319c407e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered migration operations if the field is in unique_together

Django
In reply to this post by Django
#29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered
migration operations if the field is in unique_together
----------------------------+------------------------------------
     Reporter:  Ed Morley   |                    Owner:  (none)
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  master
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------

Comment (by Jeff):

 @TimGraham I believe this can be closed as a duplicate of #28862

--
Ticket URL: <https://code.djangoproject.com/ticket/29123#comment:10>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.5f4d3863f11f46e88faab2533297e653%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered migration operations if the field is in unique_together

Django
In reply to this post by Django
#29123: Changing an IntegerField to a ForeignKey generates incorrectly ordered
migration operations if the field is in unique_together
----------------------------+-------------------------------------
     Reporter:  Ed Morley   |                    Owner:  (none)
         Type:  Bug         |                   Status:  closed
    Component:  Migrations  |                  Version:  master
     Severity:  Normal      |               Resolution:  duplicate
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+-------------------------------------
Changes (by Ramiro Morales):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 Duplicate of #28862

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