fix(sql): assign migration adding msgs.deleted a new number

This commit is contained in:
link2xt
2024-06-27 14:56:42 +00:00
parent 72a1406b86
commit c400491c07

View File

@@ -907,15 +907,6 @@ CREATE INDEX msgs_status_updates_index2 ON msgs_status_updates (uid);
)
.await?;
}
if dbversion < 111 {
// Whether the message part doesn't need to be stored on the server. If all parts are marked
// deleted, a server-side deletion is issued.
sql.execute_migration(
"ALTER TABLE msgs ADD COLUMN deleted INTEGER NOT NULL DEFAULT 0",
111,
)
.await?;
}
if dbversion < 111 {
sql.execute_migration(
@@ -951,6 +942,16 @@ CREATE INDEX msgs_status_updates_index2 ON msgs_status_updates (uid);
.await?;
}
if dbversion < 116 {
// Whether the message part doesn't need to be stored on the server. If all parts are marked
// deleted, a server-side deletion is issued.
sql.execute_migration(
"ALTER TABLE msgs ADD COLUMN deleted INTEGER NOT NULL DEFAULT 0",
116,
)
.await?;
}
let new_version = sql
.get_raw_config_int(VERSION_CFG)
.await?