#36364: Migration executor cannot handle AlterField operation on ForeignObject
-------------------------------------+-------------------------------------
     Reporter:  Jacob Walls          |                    Owner:  (none)
         Type:  Bug                  |                   Status:  new
    Component:  Migrations           |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:  composite primary    |             Triage Stage:
  key                                |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls):

 Just chiming in to add that, as I mentioned, this is reproducible without
 "migrating from a composite primary key" but rather migrating away from
 the `ForeignObject`. E.g., making this single change from

 {{{
     item = models.ForeignObject(
         OrderLineItem,
         on_delete=models.CASCADE,
         from_fields=("item_order_id", "item_product_id"),
         to_fields=("order_id", "product_id"),
     )
 }}}

 to
 {{{
     item = models.IntegerField()
 }}}

 reproduces the issue.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36364#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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/010701969b22c8b0-a9525353-b646-418e-bba1-78b2865320db-000000%40eu-central-1.amazonses.com.

Reply via email to