Say that I want to migrate a PostgreSQL database on Heroku to MySQL on EC2 and I need to preserve the ID values in all the tables, what's the best way to accomplish that without using paid software?
1 Answer
It's quite simple.
I would have mySQL instance locally, heroku db:pull to get it from Heroku Postgres to your local development mySQL instance, back it up and then restore the backup to your EC2 MySQL instance
-
I'm guessing heroku db:pull preserve the ID values even if they are pulled into a different type of database? If so, then this is a winner.Bob– Bob04/06/2011 05:02:29Commented Apr 6, 2011 at 5:02
-
yep, it uses TAPS behind the scene, works very well - just watch out sometimes if you've done some DB specific sql that it may break going over to another DB platform.John Beynon– John Beynon04/06/2011 08:08:15Commented Apr 6, 2011 at 8:08