Fix syntax error in migrate script

```
migrate: line 98: syntax error near unexpected token `fi'
```
Merge pull request #2195 from felixbuenemann/fix-migrate

Fix syntax error in migrate script