mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
Make the index a partial index
This commit is contained in:
parent
3eee0c1afa
commit
8b2d34b9e8
2 changed files with 2 additions and 3 deletions
|
|
@ -74,8 +74,7 @@ CREATE TABLE IF NOT EXISTS crypto_megolm_inbound_session (
|
|||
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 INDEX crypto_megolm_inbound_session_backup_idx ON crypto_megolm_inbound_session(account_id, key_backup_version) WHERE session IS NOT NULL;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS crypto_megolm_outbound_session (
|
||||
account_id TEXT,
|
||||
|
|
|
|||
|
|
@ -1,2 +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);
|
||||
CREATE INDEX crypto_megolm_inbound_session_backup_idx ON crypto_megolm_inbound_session(account_id, key_backup_version) WHERE session IS NOT NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue