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
514 stars 56 forks source link

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

Open kekekekule opened 3 months ago

kekekekule commented 3 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 3 months ago

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