简体   繁体   中英

Heroku Rails mySql (mysql2 gem) migrations

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.

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

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM