Add clobbered event_id

This commit is contained in:
Erik Johnston 2017-05-30 14:53:01 +01:00
parent a584a81b3e
commit 04095f7581
2 changed files with 3 additions and 1 deletions

View file

@ -749,6 +749,7 @@ class EventsStore(SQLBaseStore):
"type": key[0], "type": key[0],
"state_key": key[1], "state_key": key[1],
"event_id": ev_id, "event_id": ev_id,
"prev_event_id": to_delete.get(key, None),
} }
for key, ev_id in state_deltas.iteritems() for key, ev_id in state_deltas.iteritems()
] ]

View file

@ -19,7 +19,8 @@ CREATE TABLE current_state_delta_stream (
room_id TEXT NOT NULL, room_id TEXT NOT NULL,
type TEXT NOT NULL, type TEXT NOT NULL,
state_key TEXT NOT NULL, state_key TEXT NOT NULL,
event_id TEXT -- Is null if the key was removed event_id TEXT, -- Is null if the key was removed
prev_event_id TEXT
); );
CREATE INDEX current_state_delta_stream_idx ON current_state_delta_stream(stream_id); CREATE INDEX current_state_delta_stream_idx ON current_state_delta_stream(stream_id);