Вопрос

I have a rails app in which there is a lot of data in the database. I have come to realise that on heroku only PostgreSQL is supported. Now my database is MySQL. Is there any way I can get rails to copy all the data from the database into the seed file without me having to type everything out by hand?

Это было полезно?

Решение

No rails does not have the ability to do that.

You can look into the mysqltopostgres gem. This blog entry covers the usage pretty well. http://onestoryeveryday.com/mysql-to-postgresql-conversionmigration.html

Другие советы

Heroku supports MySQL with the ClearDB addon.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top