up vote 1 down vote favorite
share [fb]

I have a RAILS 3.x application developed locally using MySQL which has data which needs migrating. Now I want to deploy to Heroku, which uses Postgresql and also transfer the data.

The issue is in dealing with the columns with NULL data which the import process doesn't like.

I've attempted using a number of different strategies such as

  1. yaml_db gem - fails to import at all
  2. rails-backup-migrate gem - doesn't like the encoded NULL element;
  3. taps - fails on import without much detail

Has anyone tried any other strategies, gems or methods? Should I just start over with a Postgresl local DB instead ?

thanks in advance grant

link|improve this question

80% accept rate
not well versed in the problem, is there some way to use an intermediary like sqlite locally before pushing to heroku? – ZMorek Nov 1 '11 at 22:23
Does your current MySQL database really match your schema? – mu is too short Nov 1 '11 at 23:02
Yes - i've run the migrations to create the tables and this has the data populated from another legacy system. But just in case will re-check. – Grant Sayer Nov 1 '11 at 23:06
Have you tried heroku db:push or is that where taps fails without much detail? – mu is too short Nov 1 '11 at 23:20
Yes - tried the heroku db:push which chugs along and then fails without too much help. – Grant Sayer Nov 2 '11 at 3:05
show 1 more comment
feedback

1 Answer

up vote 1 down vote accepted

Should I just start over with a Postgresl local DB instead ?

Heroku recommends that you use Postgres for local development.

Your production and development environment should be as close to identical as possible. This prevents difficult to diagnose bugs introduced by subtle differences between your environments. Every application on Heroku comes with a PostgreSQL database as the default SQL database. Therefore you should use PostgreSQL for your local development database as well. ( http://devcenter.heroku.com/articles/rails3 )

A quick search turned up this:

http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#MySQL

Good luck!

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.