new migration and error handling