migrations and View function