# Diff-ing database to test data migration?

**URL:** <https://www.ruby-forum.com/t/diff-ing-database-to-test-data-migration/141453>\
**Category:** Rails\
**Created:** [June 26, 2008, 12:01am UTC](https://www.ruby-forum.com/t/diff-ing-database-to-test-data-migration/141453 "2008-06-26T00:01:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_LIn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/45deac/32.png) [@Eric\_LIn](https://www.ruby-forum.com/u/Eric_LIn)\
**Post date:** [June 26, 2008, 12:01am UTC](https://www.ruby-forum.com/t/diff-ing-database-to-test-data-migration/141453/1 "2008-06-26T00:01:54Z")

</div>

Hi All,

Is there a tool for diff-ing the before and after state of a database  
(both table structure and data) for the purpose of ensuring a Rails  
migration has the desired effect?

If that’s not possible, is there a way to see the SQL statements  
executed by a migration, for the same purpose?

Thanks,  
Eric

---

<div class="post-metadata">

**Author:** ![Eric\_LIn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/45deac/32.png) [@Eric\_LIn](https://www.ruby-forum.com/u/Eric_LIn)\
**Post date:** [June 26, 2008, 12:27am UTC](https://www.ruby-forum.com/t/diff-ing-database-to-test-data-migration/141453/2 "2008-06-26T00:27:40Z")

</div>

Answering my own question, I found diff-ing the output of MySQL  
Administrator’s backup functionality gives pretty concise summary of  
the schema and data changes.
