How to migrate from SQLite to PostgreSQL (Rails)

Leonardo Dario Perna picture Leonardo Dario Perna · Nov 22, 2010 · Viewed 10.7k times · Source

I'm a DB noob so please be kind with me.

I'm having some issues pushing my SQLite DB to Heroku via taps gem. Talking with them, they told me one of the solutions could be converting locally my DB from SQLite to PostgreSQL. Is there an easy way to do so?

Thanks

More info: - DB from Rails app - I'm on Mac OS X - Just installed PostgreSQL via macports

Answer

jxpx777 picture jxpx777 · Nov 22, 2010

sqlite3 development.db .dump | psql dbname username