From 02db7eb209af879a0168a371b4cb1c2ad0fcab49 Mon Sep 17 00:00:00 2001
From: Erik Johnston <erik@matrix.org>
Date: Wed, 10 Dec 2014 14:02:48 +0000
Subject: Fix bug when uploading state with empty state_key

---
 synapse/storage/schema/im.sql | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'synapse/storage/schema/im.sql')

diff --git a/synapse/storage/schema/im.sql b/synapse/storage/schema/im.sql
index cb0c494ddf..0300bb29e1 100644
--- a/synapse/storage/schema/im.sql
+++ b/synapse/storage/schema/im.sql
@@ -35,11 +35,13 @@ CREATE INDEX IF NOT EXISTS events_room_id ON events (room_id);
 
 CREATE TABLE IF NOT EXISTS event_json(
     event_id TEXT NOT NULL,
+    room_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 INDEX IF NOT EXISTS event_json_room_id ON event_json(room_id);
 
 
 CREATE TABLE IF NOT EXISTS state_events(
-- 
cgit 1.4.1

