Merged in pr/1

Improved the compatibility between migrations and the ORM. This adds diff functionality.