Initial data migration code