简体   繁体   中英

Rails : Database Seed

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通过ClearDB插件支持MySQL。

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