summary refs log tree commit diff
path: root/synapse/storage/engines/sqlite3.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-02 10:06:22 +0100
committerErik Johnston <erik@matrix.org>2015-04-02 10:06:22 +0100
commit779f7b0f443bfab351702161763b62b7bb6a27d8 (patch)
tree43729d7eb2030bf124ca0d8fa742ffa056bdb79f /synapse/storage/engines/sqlite3.py
parentFix SQLite support (diff)
downloadsynapse-779f7b0f443bfab351702161763b62b7bb6a27d8.tar.xz
Fix unicode support
Diffstat (limited to 'synapse/storage/engines/sqlite3.py')
-rw-r--r--synapse/storage/engines/sqlite3.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/storage/engines/sqlite3.py b/synapse/storage/engines/sqlite3.py
index 639cdea41d..e802b5d5fd 100644
--- a/synapse/storage/engines/sqlite3.py
+++ b/synapse/storage/engines/sqlite3.py
@@ -13,6 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+from synapse.storage import prepare_database, prepare_sqlite3_database
+
 
 class Sqlite3Engine(object):
     def __init__(self, database_module):
@@ -23,3 +25,10 @@ class Sqlite3Engine(object):
 
     def encode_parameter(self, param):
         return param
+
+    def on_new_connection(self, db_conn):
+        self.prepare_database(db_conn)
+
+    def prepare_database(self, db_conn):
+        prepare_sqlite3_database(db_conn)
+        prepare_database(db_conn, self)