Refactored migration scripts.