summary refs log tree commit diff
path: root/synapse/storage/schema/full_schemas
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-07-26 14:54:04 +0100
committerRichard van der Hoff <richard@matrix.org>2018-07-26 14:54:04 +0100
commit51d7df19158de0f21e659625bf43716ff0a700bc (patch)
tree94227792b40b49528653b573685ef7007c41e528 /synapse/storage/schema/full_schemas
parentStop populating events.content (diff)
downloadsynapse-51d7df19158de0f21e659625bf43716ff0a700bc.tar.xz
Create the column nullable
There's no real point in ever making the column non-nullable, and doing so
breaks the sytests.
Diffstat (limited to 'synapse/storage/schema/full_schemas')
-rw-r--r--synapse/storage/schema/full_schemas/16/im.sql7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/storage/schema/full_schemas/16/im.sql b/synapse/storage/schema/full_schemas/16/im.sql
index ba5346806e..5f5cb8d01d 100644
--- a/synapse/storage/schema/full_schemas/16/im.sql
+++ b/synapse/storage/schema/full_schemas/16/im.sql
@@ -19,7 +19,12 @@ CREATE TABLE IF NOT EXISTS events(
     event_id TEXT NOT NULL,
     type TEXT NOT NULL,
     room_id TEXT NOT NULL,
-    content TEXT NOT NULL,
+
+    -- 'content' used to be created NULLable, but as of delta 50 we drop that constraint.
+    -- the hack we use to drop the constraint doesn't work for an in-memory sqlite
+    -- database, which breaks the sytests. Hence, we no longer make it nullable.
+    content TEXT,
+
     unrecognized_keys TEXT,
     processed BOOL NOT NULL,
     outlier BOOL NOT NULL,