Modify deploy.bash, create create_db.sql template

Fix error with  apreq