fix: Update last_rcvd_timestamp in migration (#8434)

Fix https://github.com/chatmail/core/issues/8429
This commit is contained in:
Hocuri
2026-07-20 15:17:36 +02:00
committed by GitHub
parent d34dd40aa0
commit 23c216c84b

View File

@@ -2487,6 +2487,24 @@ UPDATE msgs SET state=24 WHERE state=18; -- Change OutPreparing to OutFailed.
.await?;
}
inc_and_check(&mut migration_version, 157)?;
if dbversion < migration_version {
// Ensure that existing transports
// don't start out with last_rcvd_timestamp=0,
// so that they are not immediately deleted
sql.execute_migration_transaction(
|transaction| {
transaction.execute(
"UPDATE transports SET last_rcvd_timestamp=?1 WHERE last_rcvd_timestamp=0",
(tools::time(),),
)?;
Ok(())
},
migration_version,
)
.await?;
}
let new_version = sql
.get_raw_config_int(VERSION_CFG)
.await?