You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
We added the deprecate_field to a foreign key field and it doesn't generate a migration for the change.
Is it related to the foreign key or because it's Django 3.2.9?
Here is the sample code:
On top of my head, I think deprecate_field is not generating a migration because the FK field is already nullable. The library will only generate a migration if this property changes on the field.
So, to "remove" the column safely, you shouldn't remove it at all.
For now, mark it as deprecated in order to ensure that you are not using it anymore in your code base.
Once you are sure of this (empirically), you can delete the column and generate the drop migration
Hi
We added the
deprecate_field
to a foreign key field and it doesn't generate a migration for the change.Is it related to the foreign key or because it's Django 3.2.9?
Here is the sample code:
We are already good to remove the field but we were following the recommended on https://github.com/3YOURMIND/django-migration-linter/blob/main/docs/incompatibilities.md#arrow_forward-dropping-a-column
But we can't make the linter happy. We wonder if it's because of the missing migration to deprecate the field.
The text was updated successfully, but these errors were encountered: