Merge pull request #813 from YunoHost/fix-psql-user-db-owner

[fix] Psql user should own the database
This commit is contained in:
Alexandre Aubin 2020-04-27 22:20:12 +02:00 committed by GitHub
commit 3d39023266
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,6 +87,7 @@ ynh_psql_create_db() {
# grant all privilegies to user
if [ -n "$user" ]; then
sql+="ALTER DATABASE ${db} OWNER TO ${user};"
sql+="GRANT ALL PRIVILEGES ON DATABASE ${db} TO ${user} WITH GRANT OPTION;"
fi