Saparate the migrations classes to files.

#6035