Drop unused columns

We are currently using libsqlite3-sys 0.25.2,
corresponding to SQLcipher 4.5.2
and SQLite 3.39.2.

SQLite supports ALTER TABLE DROP COLUMN since version 3.35.0,
and it has received critical database corruption bugfixes in 3.35.5.
There have been no fixes to it between SQLite 3.36.0 and 3.41.0,
so it appears stable now.
This commit is contained in:
link2xt
2023-03-09 11:31:34 +00:00
parent 9e03f26992
commit 00791157e2
2 changed files with 12 additions and 0 deletions

View File

@@ -690,6 +690,17 @@ CREATE INDEX smtp_messageid ON imap(rfc724_mid);
}
sql.set_db_version(98).await?;
}
if dbversion < 99 {
sql.execute_migration(
"ALTER TABLE msgs DROP COLUMN server_folder;
ALTER TABLE msgs DROP COLUMN server_uid;
ALTER TABLE msgs DROP COLUMN move_state;
ALTER TABLE chats DROP COLUMN draft_timestamp;
ALTER TABLE chats DROP COLUMN draft_txt",
99,
)
.await?;
}
let new_version = sql
.get_raw_config_int(VERSION_CFG)