I’ve been thinking about this problem for a while and have yet to come up with any stable/elegant ideas.
I know with MyISAM tables, you can get the table def update time but thats not so true with InnoDB and I’ve found its not even reliable to look at the .frm file for an idea of when the definition might have been modified…. nevermind if the dataset has been changed.
I had an idea of every 30 minutes mysqldumping the contents of a schema, breaking that apart with an AWK script, then diffing that to the last version… but that seems a little excessive and could be a problem if the dataset involved is large.
This reminds me of this question: How do you manage database revisions on a medium sized project with branches? but maybe I’m being to general…
http://odetocode.com/Blogs/scott/archive/2008/01/30/11702.aspx
The codebase I’m currently working on does not have an ORM yet we still use the solution based on the blog above. It works.