-- v4 -> v5 (compatible with v1+): Copies a history wrote before its room's user was in it (QA-289) -- A portal's history written while its user was not in the new room went out under keys none of their -- devices got. It is written again once they are in, and the copies it wrote first are deleted once it -- is: until then they name the files the history written again shows too. CREATE TABLE xessenger_migrate_stale ( bridge_id TEXT NOT NULL, old_room_id TEXT NOT NULL, new_event_id TEXT NOT NULL, old_event_id TEXT NOT NULL, -- Whether the copy was deleted in the new room before the history was set to be written again: the -- message it moved was taken back, and its copy written again goes too. deleted BOOLEAN NOT NULL DEFAULT false, PRIMARY KEY (bridge_id, old_room_id, new_event_id) );