summary refs log tree commit diff
path: root/synapse/storage/schema/im.sql
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-01 16:21:17 +0000
committerErik Johnston <erik@matrix.org>2014-12-01 16:22:07 +0000
commitec2b5d8c284451179c0f7b72c46dda0dd81f6f5f (patch)
tree558ddd1adeb905df498b4fbafba32cd9590a792a /synapse/storage/schema/im.sql
parentre-add OSX troubleshooting instructions (not sure how they got lost) (diff)
downloadsynapse-ec2b5d8c284451179c0f7b72c46dda0dd81f6f5f.tar.xz
Store full JSON of events in db
Diffstat (limited to 'synapse/storage/schema/im.sql')
-rw-r--r--synapse/storage/schema/im.sql10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/storage/schema/im.sql b/synapse/storage/schema/im.sql
index 8ba732a23b..cb0c494ddf 100644
--- a/synapse/storage/schema/im.sql
+++ b/synapse/storage/schema/im.sql
@@ -32,6 +32,16 @@ CREATE INDEX IF NOT EXISTS events_stream_ordering ON events (stream_ordering);
 CREATE INDEX IF NOT EXISTS events_topological_ordering ON events (topological_ordering);
 CREATE INDEX IF NOT EXISTS events_room_id ON events (room_id);
 
+
+CREATE TABLE IF NOT EXISTS event_json(
+    event_id TEXT NOT NULL,
+    json BLOB NOT NULL,
+    CONSTRAINT ev_j_uniq UNIQUE (event_id)
+);
+
+CREATE INDEX IF NOT EXISTS event_json_id ON event_json(event_id);
+
+
 CREATE TABLE IF NOT EXISTS state_events(
     event_id TEXT NOT NULL,
     room_id TEXT NOT NULL,