Automatic MySQL migration
August 6, 2009 8:06 AM
Subscribe
How can I automate the migration of an existing MySQL database to a newer schema?
I have two MySQL databases which started out with a common schema, but while one has evolved the other has remained frozen. The changes are all either modifications to a column's datatypes, or the adding or dropping of tables and columns -- no columns are renamed, and it's purely one-way so no merging is required.
I can get the schema for both databases with mysqldump -d, and a diff shows up clearly the changes that need to be made to the first DB. It's just that there are a lot of them, and writing the script to ALTER all the tables by hand will be a chore and error-prone.
Is there some of way of automating this? Ideally some tool that allows me to upload both schemas and spits out a script.
posted by fightorflight to computers & internet (5 comments total)
1 user marked this as a favorite
posted by le morte de bea arthur at 8:32 AM on August 6