#31416: FieldError when migrating field to new model subclass.
-------------------------------+------------------------------------
     Reporter:  Eduard Anghel  |                    Owner:  Nan Liu
         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 Sanskar Jaiswal):

 Replying to [comment:6 Simon Charette]:
 > I think it should be doable to teach the auto-detector about generating
 these operations in the right order.
 >
 > I think the best approach would be to adjust `check_dependency` to
 account for this case.

 I am not able to figure out how adjusting `check_dependency`, could help
 solve this issue. Assuming that I loop through all fields present in the
 base model, check if they're present in the inherited model, and if there
 are any such fields present, append `base_app_label, base_name,
 field_name, False` to `dependencies`, how would adjusting
 `check_dependency` able to reorder the migrations?

 Thanks
 Sanskar

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31416#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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.1aa4e5fb9a3e84efe8137ab540b1fc01%40djangoproject.com.

Reply via email to