Fix issue with migrations containing stored procedures