Managing the changes can be tricky and challenging costing your team endless hours spent reconciling what is in production against local and integration environments in order to push model changes to your staging environment.
As we currently generate most of our model directly from JPA as I posted before there is a serious need to see what is different from current proposed model and existing database schema.
In MySQL you have mysqldump tool however there is an important feature request which has not be addressed yet at the time of this writing.
Basically KEY and CONSTRAINT are not ordered and so as you modify the schema your diff will be alerting about false positives. You end up spending simply too much time inspecting differences.
I have decided to spend some time to make sure I get a consistent ordered mysqldump that my team can use to reconcile data from production with any other environment. That is why I coded a gawk script to sort mysqldump output.
Here is how to use the script to understand how unsorted your local mysql DATABASE is:
$ mysqldump --routines --no-data -h localhost -u USERNAME -pPASSWORD DATABASE > local.sql $ ./mysqldump_sort.gawk < local.sql > local_sorted.sql $ diff local.sql local_sorted.sql