I know and love liquibase for schema migrations / schema diffing very much, but lately I have a weird use case to support – content management data migrations. Most of the non-enterprise ones tend to save a lot of structural data as SQL records and as such make it a PITA to keep such setups in sync.
So what I’m desparately looking for is a scriptable, configurable, multi-platform (Windows and Mac OS X at least) software that allows me to diff the data of two MySQL databases that share a common schema, that lets me configure which tables I’d like to diff (and maybe a few other things) and that outputs an SQL file with the differences so that I can stich that into my other liquibase migration files.
Yes, I know that there are such tools from RedGate, DBSolo, and what they are called (and I was astonished of the lack of Free Software tools in this area!), but they all seem to have at least two downsides: They can’t be automated / scripted and / or aren’t multi-platform.
TL;DR: Does anybody know a data diff lib / program for MySQL, ideally Java, that is scriptable via Ant or command line and that outputs SQL?
You might want to try SQL Workbench/J’s WbDataDiff command.
It can be run in batch mode thus it’s scriptable via commandline. You might even be able to run it from Ant as it is a Java application.