From 97be5d5ccb712a519e583d073393900eb0815955 Mon Sep 17 00:00:00 2001 From: projectmoon Date: Mon, 24 May 2021 22:10:41 +0000 Subject: [PATCH] Add migration to remove room state management tables. --- .../migrator/migrations/V7__no_more_room_state.rs | 10 ++++++++++ src/matrix.rs | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 src/db/sqlite/migrator/migrations/V7__no_more_room_state.rs diff --git a/src/db/sqlite/migrator/migrations/V7__no_more_room_state.rs b/src/db/sqlite/migrator/migrations/V7__no_more_room_state.rs new file mode 100644 index 0000000..e29c52e --- /dev/null +++ b/src/db/sqlite/migrator/migrations/V7__no_more_room_state.rs @@ -0,0 +1,10 @@ +use barrel::backend::Sqlite; +use barrel::{types, Migration}; + +pub fn migration() -> String { + let mut m = Migration::new(); + + m.drop_table_if_exists("room_info"); + m.drop_table_if_exists("room_users"); + m.make::() +} diff --git a/src/matrix.rs b/src/matrix.rs index 58d2e53..5c9f6a8 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -1,6 +1,6 @@ use futures::stream::{self, StreamExt, TryStreamExt}; use log::error; -use matrix_sdk::{events::room::message::NoticeMessageEventContent, room::Joined, StoreError}; +use matrix_sdk::{events::room::message::NoticeMessageEventContent, room::Joined}; use matrix_sdk::{ events::room::message::{InReplyTo, Relation}, events::room::message::{MessageEventContent, MessageType},