Home Heroku Rails mySql (mysql2 gem) migrations
Reply: 1

Heroku Rails mySql (mysql2 gem) migrations

maverick5
1#
maverick5 Published in 2017-11-29 15:36:39Z

Been able to make migrations (add columns etc) on my local machine with mysql.

But when trying to push these migrations to Heroku, they continue to fail.

The first table in my migration file gets tagged with:

 Mysql2::Error: Table 'xxxxx' already exists

locally all my migrations showing as:

 up     20171127214206  Add tags to business

but when running heroku run rake db:migrate:status

 down    20171127214206  Add tags to business

i don't mind losing all the data at this point as i'm working in a development version on Heroku and will merge later with production

been working on this issue for over a day, so any and all advice appreciated.

olucube
2#
olucube Reply to 2017-12-01 03:13:02Z

according to this and many other sources, it appears you're better to use postgresql adapter with heroku. If you want to do that, you need to edit your database.yml similar to this

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.352685 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO