1

I deleted two models from models.py, and when I run makemigrations and migrate locally, everything is fine. When I run makemigrations on Heroku, I get the following message, where Building and BuildingInstance are the models I deleted:

Migrations for 'hello':
0002_building_buildinginstance.py:
- Create model Building
- Create model BuildingInstance

When I run migrate, I get:

Running migrations:
No migrations to apply.
Your models have changes that are not yet reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.

I followed the steps here and also tried squashing the migrations locally and on Heroku as suggested here. How can I fix this problem?

Community
  • 1
  • 1
ech19
  • 35
  • 3

1 Answers1

1

As I have written many times here, you must not run makemigrations on Heroku. Run it locally, commit the result, and then​ run migrate on Heroku.

Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895