Add compatibility code

I was thinking in the lines of something like this. Should make migrations
a lot easier to implement and test.