Change create migration method from streams to sync operations
Add test for creating migration