Fix database creation and unify psql commands.