End migration and model