Changes between Version 3 and Version 4 of Ticket #33366, comment 11
- Timestamp:
- Dec 16, 2021, 1:57:07 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33366, comment 11
v3 v4 6 6 7 7 1. Augment the documentation to mention under which circumstances such `AlterField` operations can be created and mention that it is safe to adjust historic migrations to use the proper ''placeholder'' syntax to prevent it from happening (it's safe even if your library supports Django < 4.0 as well because the models were rendered and thus `related_name` were evaluated at field binding time). 8 2. Adjust the auto-detector to consider `related_name='app_model` and `'%(app_label)s_%(class)s'` equals (in the context of a `app.Model` model) to prevent changes from being detected. This will have the unfortunate side effect to prevent changes of a field from harcoded to placeholders based `related_name` to be detected by the framework which could be considered a limitation of the previous approachmodel rendering based approach.8 2. Adjust the auto-detector to consider `related_name='app_model` and `'%(app_label)s_%(class)s'` equals (in the context of a `app.Model` model) to prevent changes from being detected. This will have the unfortunate side effect to prevent changes of a field from harcoded to placeholders based `related_name` to be detected by the framework which could be considered a limitation of the previous model rendering based approach. 9 9 10 10 I personally think that 1. is the way to go but I don't have a strong feeling here.