divio/django-cms — pull request #3613 by mkoistinen (2014-11-26 02:09:52+00:00)
Title: Fix makemigrations in develop.py and let it make initial migrations as required

The `call_command('schemamigration'…)` returns a `SystemExit` when it is complete. Without a try/except block around it, this will cause a loop to prematurely terminate in a seemingly normal way. This is what was happening before this fix, and this effectively caused `develop.py makemigrations` to only ever make migrations for cms, which happens to be the first appliation in the list it works with.

Also, I've added code that will first check to see if an app already has migrations and if not, it will run the equivalent of `manage.py schemamigration [app] --initial` and emit a notice of the same.

Finally, this now detects if an application in the list if not found, and emits a notice of this too.