mirror of
https://github.com/chatmail/core.git
synced 2026-09-22 13:01:21 +03:00
fix: Update last_rcvd_timestamp in migration (#8434)
Fix https://github.com/chatmail/core/issues/8429
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user