Added migrations handling