mirror of
https://github.com/zulip/zulip.git
synced 2025-10-27 18:13:58 +00:00
upgrade-zulip: Support arbitrary database user and dbname.
Co-authored-by: Adam Birds <adam.birds@adbwebdesigns.co.uk>
This commit is contained in:
committed by
Tim Abbott
parent
1d59330cbc
commit
7ff3c9f966
@@ -581,8 +581,10 @@ def get_deploy_options(config_file: configparser.RawConfigParser) -> List[str]:
|
||||
|
||||
|
||||
def run_psql_as_postgres(
|
||||
config_file: configparser.RawConfigParser,
|
||||
sql_query: str,
|
||||
) -> None:
|
||||
dbname = get_config(config_file, "postgresql", "database_name", "zulip")
|
||||
subcmd = " ".join(
|
||||
map(
|
||||
shlex.quote,
|
||||
@@ -590,8 +592,8 @@ def run_psql_as_postgres(
|
||||
"psql",
|
||||
"-v",
|
||||
"ON_ERROR_STOP=1",
|
||||
# TODO: Stop hardcoding the database name.
|
||||
"zulip",
|
||||
"-d",
|
||||
dbname,
|
||||
"-c",
|
||||
sql_query,
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user