Extract migration stuff