Generate migration template fix and New migrate command