3YOURMIND / django-migration-linter

:rocket: Detect backward incompatible migrations for your django project
https://pypi.python.org/pypi/django-migration-linter/
Apache License 2.0
530 stars 58 forks source link

Implement an option to apply migrations along with executing sqlmigrate #286

Open kekekekule opened 8 months ago

kekekekule commented 8 months ago

The flow is exactly:

The main reason is that: 1) Some migrations require the previous ones to be applied (e.g. changing unique constraints) 2) We can lint not only the migrations' SQL, but also check whether migrations can be applied from scratch

I suggest a new flag like --migrate-from-scratch that could make the linter behave like this. The only limitation is this the option can clash with some other (app_label, migration_name, include-name, etc)

kekekekule commented 8 months ago

I wanna implement this maybe in a month, when I'll have enough of free time