Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

let update_synapse_database run on a multi-database configurations #13422

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/13422.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a long-standing bug where the `update_synapse_database` script could not be run with multiple databases. Contributed by @thefinn93 @ Beeper.
8 changes: 0 additions & 8 deletions synapse/_scripts/update_synapse_database.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import argparse
import logging
import sys
from typing import cast

import yaml
Expand Down Expand Up @@ -100,13 +99,6 @@ def main() -> None:
# Load, process and sanity-check the config.
hs_config = yaml.safe_load(args.database_config)

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. "
"See https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#database"
)
sys.exit(4)

config = HomeServerConfig()
config.parse_config_dict(hs_config, "", "")

Expand Down