1802 | Subhas/Viky | Fixed bug

And refactored/tested migration scripts