From e2ea0cef4cd1e4cccbf4f57d5dd8e8cc83197952 Mon Sep 17 00:00:00 2001 From: finn Date: Wed, 27 Jul 2022 12:48:06 -0700 Subject: [PATCH] Allow sharded database in db migrate script Signed-off-by: Finn Herzfeld --- synapse/_scripts/update_synapse_database.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse/_scripts/update_synapse_database.py b/synapse/_scripts/update_synapse_database.py index b4aeae6dd5b8..d0e227fa15d0 100755 --- a/synapse/_scripts/update_synapse_database.py +++ b/synapse/_scripts/update_synapse_database.py @@ -97,8 +97,8 @@ def main() -> None: # Load, process and sanity-check the config. hs_config = yaml.safe_load(args.database_config) - if "database" not in hs_config: - sys.stderr.write("The configuration file must have a 'database' section.\n") + if "database" not in hs_config and "databases" not in hs_config: + sys.stderr.write("The configuration file must have a 'database' or 'databases' section.\n") sys.exit(4) config = HomeServerConfig()