]> Git — Sourcephile - gargantext.git/blob - devops/postgres/create
[API] Search API using generics with front
[gargantext.git] / devops / postgres / create
1 #!/bin/bash
2
3 # sudo su postgres
4
5 # postgresql://$USER:$PW@localhost/$DB
6
7 PW="C8kdcUrAQy66U"
8 DB="gargandbV5"
9 USER="gargantua"
10
11 psql -c "CREATE USER \"${USER}\""
12 psql -c "ALTER USER \"${USER}\" with PASSWORD '${PW}'"
13
14 psql -c "DROP DATABASE IF EXISTS \"${DB}\""
15 createdb "${DB}"
16 psql "${DB}" < schema.sql
17
18 psql -c "ALTER DATABASE \"${DB}\" OWNER to \"${USER}\""
19
20
21
22
23