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

Commit

Permalink
Backport fixes to sqlite upgrade from develop (#6578)
Browse files Browse the repository at this point in the history
* commit '4caab0e95':
  Backport fixes to sqlite upgrade from develop (#6578)
  • Loading branch information
anoadragon453 committed Mar 20, 2020
2 parents efd80e0 + 4caab0e commit b7059be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog.d/6578.bugfix
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 2 additions & 4 deletions synapse/storage/engines/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import struct
import threading

from synapse.storage.prepare_database import prepare_database


class Sqlite3Engine(object):
single_threaded = True
Expand Down Expand Up @@ -60,10 +62,6 @@ def convert_param_style(self, sql):
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
Expand Down

0 comments on commit b7059be

Please sign in to comment.