When I run $ heroku run rake db:migrate, I get "Multiple migrations have the name CreateScreencasts".
Or I get: Multiple migrations have the version number 20121121161626
Is there a way to delete migrations on Heroku?
(My app code only has one)
Thanks
If you have troubles with migrations on heroku use this
heroku run bash --app appname
Then you are in a terminal on the server it self. And you can run all the rails rake commands
You can for instance do this
rake db:migrate
If you have only one migration in your git repo, you should have only one migration in your heroku repo.
It may be because you deleted an old migration which is still registered in the heroku database. Is it acceptable for you to reset your heroku database ?
This might be useful and it's already been answered
Basically you'd run
To drop the database, if you are using SHARED_DATABASE_URL:
heroku pg:reset DATABASE
To recreate the database with nothing in it:
heroku run rake db:migrate
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.