mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
Add index to make finding megolm sessions to backup faster
This commit is contained in:
parent
26e66f293e
commit
3eee0c1afa
2 changed files with 6 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
-- v0 -> v17 (compatible with v15+): Latest revision
|
||||
-- v0 -> v18 (compatible with v15+): Latest revision
|
||||
CREATE TABLE IF NOT EXISTS crypto_account (
|
||||
account_id TEXT PRIMARY KEY,
|
||||
device_id TEXT NOT NULL,
|
||||
|
|
@ -73,6 +73,9 @@ CREATE TABLE IF NOT EXISTS crypto_megolm_inbound_session (
|
|||
key_backup_version TEXT NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (account_id, session_id)
|
||||
);
|
||||
-- Useful index to find keys that need backing up
|
||||
CREATE INDEX crypto_megolm_inbound_session_backup_idx ON crypto_megolm_inbound_session(account_id, key_backup_version, session);
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS crypto_megolm_outbound_session (
|
||||
account_id TEXT,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
-- v18 (compatible with v15+): Add an index to the megolm_inbound_session table to make finding sessions to backup faster
|
||||
CREATE INDEX crypto_megolm_inbound_session_backup_idx ON crypto_megolm_inbound_session(account_id, key_backup_version, session);
|
||||
Loading…
Add table
Add a link
Reference in a new issue