Browse Source

Interrompe recriação de bancos postgres na 1a falha

pull/2188/head
Marcio Mazza 6 years ago
parent
commit
3bf8457019
  1. 2
      sapl/legacy/scripts/recria_um_db_postgres.sh

2
sapl/legacy/scripts/recria_um_db_postgres.sh

@ -1,6 +1,8 @@
# (Re)cria um db postgres
# uso: recria_um_db_postgres <NOME DO BANCO>
set -e # Exit immediately if a command exits with a non-zero status
echo "Database $1"
sudo -u postgres psql -c "drop DATABASE if exists $1"
sudo -u postgres psql -c "CREATE DATABASE $1 WITH OWNER = sapl ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'pt_BR.UTF-8' LC_CTYPE = 'pt_BR.UTF-8' CONNECTION LIMIT = -1 TEMPLATE template0;"

Loading…
Cancel
Save