-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Detect and prevent the use of AlterModelTable #259
Comments
Hey @JanChec, I'm happy that the linter is useful to you 🙏 The linter currently checks for |
Unfortunately, this doesn't prevent the case of moving the model from app to app when you have to split the state:
|
Hello
django-migration-linter
maintainers,First of all, thank you for maintaining this extremely helpful tool. I've used it in several projects and it has saved me from potential issues and bugs a number of times.
I am opening this issue to suggest an enhancement that I believe would increase the usefulness of the
django-migration-linter
further, especially for developers dealing with projects where maintaining backward compatibility is crucial.Currently, as per my understanding,
django-migration-linter
does not detect or prevent the use ofAlterModelTable
, a migration operation in Django that changes the name of a database table. This operation is capable of breaking backward compatibility.The absence of detection of such operations might potentially lead to issues in production if not caught in time. Therefore, it would be immensely beneficial if
django-migration-linter
could also detect and prevent the use ofAlterModelTable
.Here is an example of a situation that might cause problems:
This will generate a migration with
AlterModelTable
:I would like to suggest that
django-migration-linter
should flag this migration as a potential issue because it modifies the table name and could break backward compatibility.Thank you for considering this enhancement. If you need more information or further clarification, feel free to ask. I would be more than happy to help.
The text was updated successfully, but these errors were encountered: