Fixed database SQL migration shell script