summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/6578.bugfix1
-rw-r--r--synapse/storage/engines/sqlite.py6
2 files changed, 3 insertions, 4 deletions
diff --git a/changelog.d/6578.bugfix b/changelog.d/6578.bugfix
new file mode 100644

index 0000000000..fae55a4456 --- /dev/null +++ b/changelog.d/6578.bugfix
@@ -0,0 +1 @@ +Fix a bug introduced in Synapse 1.7.0 which caused an error on startup when upgrading from versions before 1.3.0. diff --git a/synapse/storage/engines/sqlite.py b/synapse/storage/engines/sqlite.py
index df039a072d..cbc74cd302 100644 --- a/synapse/storage/engines/sqlite.py +++ b/synapse/storage/engines/sqlite.py
@@ -16,6 +16,8 @@ import struct import threading +from synapse.storage.prepare_database import prepare_database + class Sqlite3Engine(object): single_threaded = True @@ -60,10 +62,6 @@ class Sqlite3Engine(object): return sql def on_new_connection(self, db_conn): - - # We need to import here to avoid an import loop. - from synapse.storage.prepare_database import prepare_database - if self._is_in_memory: # In memory databases need to be rebuilt each time. Ideally we'd # reuse the same connection as we do when starting up, but that