Django Heroku Error: Your models have changes that are not yet reflected in a migration, and so won't be applied.


I am getting this error whenever I am trying to do

heroku run python migrate

Heroku Error

asked 1 year, 11 months ago
Reputation: 1

1 Answer


This error usually comes when we have different versions of migrations file on heroku and local.

For example we have on local and say 0005_somename on heroku and this happens when we accidently run the command heroku run python migrations.

Never Run

heroku run python migrations

First do makemigrations and migrate locally and then add those newly created migrations file using git and run only migrate command on heroku.


Just rollback the version of app before that mistake was done and then again do migrate.
You can see the version of your app at different time from heroku website.
For example rollback to v30 using below command

$ heroku rollback v30

That’s it.


answered 1 year, 11 months ago
Reputation: 1

Your Answer

Nothing to preview

Post Answer

Asked:  1 year, 11 months ago
Viewed:  1366 times
Active:  1 year, 11 months ago