Encapuslated migration in class to hold state

migrate.php represents now a simple class which holds the global state taken from migrate