Fix syntax error in migrate script

Fixes:
```
migrate: line 98: syntax error near unexpected token `fi'
```