Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rails database migration - multiple migrations have the version number x

Ok, I have stuffed up my migrations. I tried to sort it by deleting duplicates, sorting the schema.rb etc but I don't think I have done it properly.

When I try to deploy to heroku, or rather heroku run rake db:migrate, I get

Multiple migrations have the version number 20130307005437

The migrate works fine on localhost but not heroku.

Unfortunately when I look for migration no 20130307005437, it's not there in my db/migrate.

How can I find it to sort the problem?

like image 441
tessad Avatar asked Jan 23 '26 16:01

tessad


1 Answers

While this file might not be visible within your directory listing, I suspect that there might already be a file within your Git repository, which is what is causing this error from appearing on Heroku and not locally.

Please ensure that you've only got one migration inside that Git repo with that number.

like image 142
Ryan Bigg Avatar answered Jan 25 '26 10:01

Ryan Bigg