aboutsummaryrefslogtreecommitdiffstats
path: root/tests/travis/prepare_pgsql.sh
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-02-11 19:36:37 -0800
committerzotlabs <mike@macgirvin.com>2018-02-11 19:36:37 -0800
commit0f8d2d4e58cd085de29c630babaf7df3a35393c3 (patch)
tree8da71ebff073f86212baf1a362063e8cdb86c4e7 /tests/travis/prepare_pgsql.sh
parent63107f5b2f5031a7cc971063b9344592cc2257e3 (diff)
parentba954b8cfeaf18477a5d7c17338efd909951744c (diff)
downloadvolse-hubzilla-0f8d2d4e58cd085de29c630babaf7df3a35393c3.tar.gz
volse-hubzilla-0f8d2d4e58cd085de29c630babaf7df3a35393c3.tar.bz2
volse-hubzilla-0f8d2d4e58cd085de29c630babaf7df3a35393c3.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'tests/travis/prepare_pgsql.sh')
-rwxr-xr-xtests/travis/prepare_pgsql.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/travis/prepare_pgsql.sh b/tests/travis/prepare_pgsql.sh
index 63c7388cb..0175b9858 100755
--- a/tests/travis/prepare_pgsql.sh
+++ b/tests/travis/prepare_pgsql.sh
@@ -33,12 +33,17 @@ psql --version
psql -U postgres -c "SELECT VERSION();"
# Create Hubzilla database
-psql -U postgres -c "DROP DATABASE IF EXISTS hubzilla;"
-psql -U postgres -c "CREATE DATABASE hubzilla;"
+psql -U postgres -c "DROP DATABASE IF EXISTS travis_hubzilla;"
+psql -U postgres -v ON_ERROR_STOP=1 <<-EOSQL
+ CREATE USER travis_hz WITH PASSWORD 'hubzilla';
+ CREATE DATABASE travis_hubzilla;
+ ALTER DATABASE travis_hubzilla OWNER TO travis_hz;
+ GRANT ALL PRIVILEGES ON DATABASE travis_hubzilla TO travis_hz;
+EOSQL
# Import table structure
-psql -U postgres -v ON_ERROR_STOP=1 hubzilla < ./install/schema_postgres.sql
+psql -U travis_hz -v ON_ERROR_STOP=1 travis_hubzilla < ./install/schema_postgres.sql
# Show databases and tables
psql -U postgres -l
-psql -U postgres -d hubzilla -c "\dt;"
+psql -U postgres -d travis_hubzilla -c "\dt;"