Migration scripts refactoring.