Add supporting code for data migration