mirror of https://github.com/zulip/zulip.git
Clean up vagrant postgres user creation code
We don't need to check whether the user exists before creating it: CREATE USER failing is fine. (imported from commit e8b2bc5495e328ee30d15445a566c0edff2f069d)
This commit is contained in:
parent
748f931999
commit
53c2b3f6f4
|
@ -34,16 +34,7 @@ ALTER USER $USERNAME PASSWORD '$PASSWORD';
|
|||
ALTER USER $USERNAME CREATEDB;
|
||||
ALTER ROLE $USERNAME SET search_path TO $SEARCH_PATH;
|
||||
|
||||
DO \$\$
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
SELECT * FROM pg_catalog.pg_user WHERE usename -- [sic]
|
||||
= '$VAGRANTUSERNAME') THEN
|
||||
|
||||
CREATE USER $VAGRANTUSERNAME;
|
||||
END IF;
|
||||
END
|
||||
\$\$ ;
|
||||
CREATE USER $VAGRANTUSERNAME;
|
||||
GRANT $USERNAME TO $VAGRANTUSERNAME;
|
||||
ALTER ROLE $VAGRANTUSERNAME SET search_path TO $SEARCH_PATH;
|
||||
EOF
|
||||
|
|
Loading…
Reference in New Issue