Migrations refactored ro support data convertion