Fix bug in Input class
Add migration handling to deploy script