Added code to handle automatic migrations