Changes between Initial Version and Version 1 of Ticket #31416, comment 7


Ignore:
Timestamp:
Apr 12, 2020, 9:49:30 PM (4 years ago)
Author:
Nan Liu

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31416, comment 7

    initial v1  
    44> I think the best approach would be to adjust `check_dependency` to account for this case.
    55
    6 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?
     6Ok. I was able to swap the operations when I appended a dependency on field removal of all of its bases. If you don't mind me asking, how am I able to know that is the field we are tryna remove? I am reading the code currently, but i will still leave this "dumb" question here just in case I don't find it by the time.
    77
    88Thanks
Back to Top