Reputation: 1165
when I ran the makemigrations
it returns
users/migrations/0002_remove_profile_image.py
- Remove field image from profile
But when i ran migrate users 0002..
it said CommandError: Cannot find a migration matching '0002_remove_profile_image.py' from app 'users'
when i ran migrate
it said
No migrations to apply.
Your models in app(s): 'users' 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.
what can i do? i am deploying on heroku
Upvotes: 2
Views: 918
Reputation: 1165
Sorry, my bad. I was running with heroku run
I should have run locally first.
Upvotes: 0
Reputation: 12068
It seems you are using the migration name with the .py
:
./manage.py migrate users 0002_remove_profile_image.py
But the correct usage is without it, so just remove that:
./manage.py migrate users 0002_remove_profile_image
or just the short-hand:
./manage.py migrate users 0002
Upvotes: 3