ar_redadeg/scripts/create_database.sh

21 lines
402 B
Bash
Raw Normal View History

2019-01-01 19:52:23 +00:00
#!/bin/sh
# utiliser un compte SUPERUSER pour exécuter ce script
# create role
createuser -l -S redadeg
# password
psql -d postgres -c "ALTER USER redadeg WITH PASSWORD 'redadeg';"
# create database with owner redadeg
createdb -E UTF8 -O redadeg redadeg
# postgis extension
psql -d redadeg -c "CREATE EXTENSION postgis;"
# create tables
2019-01-06 17:00:34 +00:00
psql -d redadeg -U redadeg -W < create_tables_3948.sql
2019-01-01 19:52:23 +00:00