Ask HN: Way to map one database schema to another?
I recently wrote a new version of a fairly popular web application. Version 1.0 was written in PHP and version 2.0 is now Python/Django.
I need a way to get my user data from version 1.0 to 2.0. I can map the columns of 1.0 to Django model fields in 2.0 (or even the database itself if necessary).
I'm looking for a tool I can use to do this. Basically, I give it a list of maps like "version1.mytable.foo" maps to "version2.mytable.bar", hit "run", and it will transfer the information from one database to another based on the maps.
Extra points if it can do the reverse as well, in case something goes terribly wrong and we have to roll back to 1.0.
Any ideas?