summaryrefslogtreecommitdiffstats
path: root/lib/private/Setup/PostgreSQL.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-09-05 10:45:11 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-09-05 10:45:11 +0200
commit7fb88ec506bca6490b4db07d1ab60308cd6675c9 (patch)
tree3bbf43e7b486c82f6da139f1f853a9d3995c754f /lib/private/Setup/PostgreSQL.php
parent8b484eedf029b8e1a9dcef0efb09db381888c4b0 (diff)
downloadnextcloud-server-7fb88ec506bca6490b4db07d1ab60308cd6675c9.tar.gz
nextcloud-server-7fb88ec506bca6490b4db07d1ab60308cd6675c9.zip
Use proper ALTER ROLE syntax
Fixes #1260 See https://www.postgresql.org/docs/9.0/static/sql-alterrole.html
Diffstat (limited to 'lib/private/Setup/PostgreSQL.php')
-rw-r--r--lib/private/Setup/PostgreSQL.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Setup/PostgreSQL.php b/lib/private/Setup/PostgreSQL.php
index 3647d5bdcec..85755ea4218 100644
--- a/lib/private/Setup/PostgreSQL.php
+++ b/lib/private/Setup/PostgreSQL.php
@@ -143,7 +143,7 @@ class PostgreSQL extends AbstractDatabase {
try {
if ($this->userExists($connection)) {
// change the password
- $query = $connection->prepare("ALTER ROLE " . addslashes($this->dbUser) . " CREATEDB WITH PASSWORD '" . addslashes($this->dbPassword) . "'");
+ $query = $connection->prepare("ALTER ROLE " . addslashes($this->dbUser) . " WITH CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'");
} else {
// create the user
$query = $connection->prepare("CREATE USER " . addslashes($this->dbUser) . " CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'");