Contributor
Manav Agarwal

Adapt schema editors to operate from model states instead of fake rendered models during migrate phase


Mentors
Mariusz Felisiak
Organization
Django Software Foundation

The new implementation will consist of a central registry in ProjectState instances where all the related fields would be registered for all apps. Then significant changes in ProjectState, Schema Editor, and Operations' subclasses would be made in order to make all of them adapt ModelStates in spite of fake rendered models in a backward-compatible way. Then the new method mapping in ProjectState for all Operation subclasses' state_forwards and state_backwards would be introduced. And after all this, the traditional __fake__ model implementation would now be replaced with new ModelState implementation