diff options
author | mrjive <mrjive@mrjive.it> | 2018-02-21 12:55:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-21 12:55:29 +0100 |
commit | 2d17e1c677cd981858a4080af98edb51bbb5d822 (patch) | |
tree | 54d5d148d368632158584ba7eec7872170524e00 /tests/travis/prepare_pgsql.sh | |
parent | d7ecaa8b23a36ea1e9a0f185017930b5552c00b5 (diff) | |
parent | a829256bc4803731881a51bddd19ee59a5a234ff (diff) | |
download | volse-hubzilla-2d17e1c677cd981858a4080af98edb51bbb5d822.tar.gz volse-hubzilla-2d17e1c677cd981858a4080af98edb51bbb5d822.tar.bz2 volse-hubzilla-2d17e1c677cd981858a4080af98edb51bbb5d822.zip |
Merge pull request #15 from redmatrix/dev
Dev
Diffstat (limited to 'tests/travis/prepare_pgsql.sh')
-rwxr-xr-x | tests/travis/prepare_pgsql.sh | 13 |
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;" |