mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-07 11:02:13 -04:00
Merge remote-tracking branch 'origin/develop' into hawkowl/userdir-search
This commit is contained in:
commit
30a8deeb68
8 changed files with 57 additions and 19 deletions
|
@ -1407,21 +1407,6 @@ class EventsStore(StateGroupWorkerStore, EventFederationStore, EventsWorkerStore
|
|||
values=state_values,
|
||||
)
|
||||
|
||||
self._simple_insert_many_txn(
|
||||
txn,
|
||||
table="event_edges",
|
||||
values=[
|
||||
{
|
||||
"event_id": event.event_id,
|
||||
"prev_event_id": prev_id,
|
||||
"room_id": event.room_id,
|
||||
"is_state": True,
|
||||
}
|
||||
for event, _ in state_events_and_contexts
|
||||
for prev_id, _ in event.prev_state
|
||||
],
|
||||
)
|
||||
|
||||
# Prefill the event cache
|
||||
self._add_to_cache(txn, events_and_contexts)
|
||||
|
||||
|
|
|
@ -37,6 +37,8 @@ CREATE TABLE IF NOT EXISTS event_edges(
|
|||
event_id TEXT NOT NULL,
|
||||
prev_event_id TEXT NOT NULL,
|
||||
room_id TEXT NOT NULL,
|
||||
-- We no longer insert prev_state into this table, so all new rows will have
|
||||
-- is_state as false.
|
||||
is_state BOOL NOT NULL,
|
||||
UNIQUE (event_id, prev_event_id, room_id, is_state)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue