summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2015-02-13 14:42:27 +0000
committerMark Haines <mjark@negativecurvature.net>2015-02-13 14:42:27 +0000
commitfa662b52d081dd86be53f6b1150b65a0bcd772a0 (patch)
tree89fbc01b5ac97742d143e6d4af7b4fc1d33da529 /synapse/storage
parentBump version (diff)
parentPrepare the database whenever a connection is opened from the db_pool so that... (diff)
downloadsynapse-fa662b52d081dd86be53f6b1150b65a0bcd772a0.tar.xz
Merge pull request #72 from matrix-org/in_memory_sqlite_for_testing
Prepare the database whenever a connection is opened from the db_pool so...
Diffstat (limited to 'synapse/storage')
-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;"