BS-1379, add integration test for migration
fix migration