Skip to content

Draft: db: Handle multiple accounts in the same rooms

WHEN TRYING THIS MR, PLEASE BACKUP YOUR DATABASE

The db schema gets changed to add the account_id to room_events and room_events_cache and the UNIQUE constraints now include it as well.

INSERT INTO tmp_room_event_cache doesn't work

The insertion into tmp_room_event_cache during DB migration currently doesn't work (so you can expect a bunch of warnings atm).

This is the query. It works just fine in sqlitebrowser, but not in the migration code.

INSERT INTO tmp_room_events_cache (id, room_id, sender_id, event_uid, origin_server_ts, json_data) 
SELECT id, room_id, sender_id, event_uid, origin_server_ts, json_data
FROM room_events_cache WHERE true;
Edited by Evangelos Ribeiro Tzaras

Merge request reports