makemigrations reports "No changes detected" if a property exists with the same field name
|Patch needs improvement:
I turned around few time trying to add a new field in my model (FK). makemigrations reported "No changes detected". I dropped the database and after migrations files cleanup, the field was still not created. The reason was I had a @property method with the same name in the model. Logically I wanted to replace this calculated field by a db field, but didn't think about to check it was here already as a property.
I would prefer that django report the problem when two properties are conflicting or may conflict in case the field is created.
Change History (5)
comment:3 by , 3 years ago
|makemigrations reports "No changes detected" if a property exists with the same name → makemigrations reports "No changes detected" if a property exists with the same field name