some changes to generate_migration