-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: django
-
None
-
Python Drivers
-
None
-
None
-
None
-
None
-
None
-
None
As documented, "makemigrations does not yet detect changes to embedded models. After you create a model with an EmbeddedModelField or add an EmbeddedModelField to an existing model, no further updates to the embedded model will be made. Using the models above as an example, if you created these models and then added an indexed field to Address, the index created in the nested Book embed is not created."
While changes to indexes and unique constraints is likely obsoleted by INTPYTHON-698 (indexes on the top-level model), embedded model field additions and deletions are still useful.
This also applies to EmbeddedModelField, EmbeddedModelArrayField, PolymorphicEmbeddedModelField, and PolymorphicEmbeddedModelArrayField, but they should be tackled one at a time, most likely.
Difficulties: it may require adding hooks to Django's autodetector, or at least copying large parts of the autodetector unless such hooks can be added.