summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-05-08 13:45:58 +0100
committerErik Johnston <erik@matrix.org>2015-05-08 13:45:58 +0100
commit4fa0f53521546c5be48a3a94815203aff84c2639 (patch)
tree53aef0b7a7858a07fabf5a208ba0c4ee000f268b
parentUPGRADES: s/v0.x.x/v0.9.0 (diff)
downloadsynapse-4fa0f53521546c5be48a3a94815203aff84c2639.tar.xz
Support reading directly from a config
-rwxr-xr-xscripts/port_from_sqlite_to_postgres.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/port_from_sqlite_to_postgres.py b/scripts/port_from_sqlite_to_postgres.py
index da25113093..e7ed4c309b 100755
--- a/scripts/port_from_sqlite_to_postgres.py
+++ b/scripts/port_from_sqlite_to_postgres.py
@@ -723,6 +723,9 @@ if __name__ == "__main__":
 
     postgres_config = yaml.safe_load(args.postgres_config)
 
+    if "database" in postgres_config:
+        postgres_config = postgres_config["database"]
+
     if "name" not in postgres_config:
         sys.stderr.write("Malformed database config: no 'name'")
         sys.exit(2)