Fixing migration db bug