Fixed the export tests
Added migration script
Fixed the migration script