Data migration for documents