pmoniq
pmoniq

Reputation: 971

How to manage django missing migration files of 3rd party apps?

I have a problem with migrations on heroku. I have just upgraded version of django from 1.8.1 to 1.8.2 in my project on heroku, because of some missing migrations:

https://github.com/django/django/blob/1.8/django/contrib/auth/migrations/0005_alter_user_last_login_null.py#L14-L18

After this upgrade, on my local project I was forced to do standard procedure: python manage.py makemigrations python manage.py migrate

Of course this new, generated migrations are outside of my git repository. If I will run heroku run this will generate new migrations in new dyno, so without any impact on my current slug.

What is the best solution for this situation? How to generate migrations or add missing migrations of django or 3rd part libs when e.g. you are doing upgrade of the libs? What is the best working strategy?

Upvotes: 6

Views: 2102

Answers (1)

pmoniq
pmoniq

Reputation: 971

Answer is quiet trivial, could be useful for others. To use MIGRATION_MODULES is the correct answer.

https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-MIGRATION_MODULES

Upvotes: 12

Related Questions