sqlite: add room_id index on direct_withheld_info table

This commit is contained in:
Richard van der Hoff
2025-10-29 15:33:48 +00:00
parent 8189010d58
commit cadbd33957
2 changed files with 12 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
CREATE INDEX "direct_withheld_info_room_id_idx"
ON "direct_withheld_info" ("room_id");

View File

@@ -291,6 +291,16 @@ async fn run_migrations(conn: &SqliteAsyncConn, version: u8) -> Result<()> {
.await?;
}
if version < 12 {
conn.with_transaction(|txn| {
txn.execute_batch(include_str!(
"../migrations/crypto_store/012_withheld_code_by_room.sql"
))?;
txn.set_db_version(12)
})
.await?;
}
Ok(())
}