fix: do not delete columns

This requires currently too much memory, crashing on larger instances
This commit is contained in:
Friedel Ziegelmayer
2023-03-17 15:35:08 +01:00
committed by GitHub
parent edcc199461
commit 6c5654f584
2 changed files with 12 additions and 10 deletions

View File

@@ -3,7 +3,6 @@
## Unreleased
### Changes
- Drop unused SQL columns #4141
- "full message view" not needed because of footers that go to contact status #4151
- Pick up system's light/dark mode in generated message HTML #4150
- Support non-persistent configuration with DELTACHAT_* env

View File

@@ -691,15 +691,18 @@ 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?;
// 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?;
// Reverted above, as it requires to load the whole DB in memory.
sql.set_db_version(99).await?;
}
let new_version = sql