summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-02-13 14:29:49 +0000
committerMark Haines <mark.haines@matrix.org>2015-02-13 14:38:24 +0000
commit183b3d4e47dd2fc0e0ca88714d0e0bd415f81736 (patch)
treea81e00d8d68824318991106717815a58c55c9146 /synapse/storage/__init__.py
parentMerge branch 'master' of github.com:matrix-org/synapse into develop (diff)
downloadsynapse-183b3d4e47dd2fc0e0ca88714d0e0bd415f81736.tar.xz
Prepare the database whenever a connection is opened from the db_pool so that in-memory databases will work
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 02b1f06854..1c22e19ab0 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -637,10 +637,13 @@ def prepare_database(db_conn):
                 c.executescript(sql_script)
 
             db_conn.commit()
+        else:
+            logger.info("Database is at version %r", user_version)
 
     else:
         sql_script = "BEGIN TRANSACTION;\n"
         for sql_loc in SCHEMAS:
+            logger.debug("Applying schema %r", sql_loc)
             sql_script += read_schema(sql_loc)
             sql_script += "\n"
         sql_script += "COMMIT TRANSACTION;"