mirror of
https://github.com/ankitects/anki.git
synced 2025-12-30 23:32:57 -05:00
avoid bumping mtime when correcting card eases on upgrade
The USN is still set, which should cause the cards to sync in the non-conflict case, but if changes have been made on other devices the ease fix will not take priority, as we could be overwriting the reviews of someone who has not synced in a while.
This commit is contained in:
parent
d63bc24c0d
commit
3988010aa2
2 changed files with 10 additions and 13 deletions
|
|
@ -1,10 +1,9 @@
|
|||
update cards
|
||||
set factor = 2500,
|
||||
usn = ?,
|
||||
mod = ?
|
||||
where factor != 0
|
||||
and factor <= 2000
|
||||
and (
|
||||
did in DECK_IDS
|
||||
or odid in DECK_IDS
|
||||
UPDATE cards
|
||||
SET factor = 2500,
|
||||
usn = ?
|
||||
WHERE factor != 0
|
||||
AND factor <= 2000
|
||||
AND (
|
||||
did IN DECK_IDS
|
||||
OR odid IN DECK_IDS
|
||||
)
|
||||
|
|
@ -404,9 +404,7 @@ impl super::SqliteStorage {
|
|||
ids_to_string(&mut ids, &affected_decks);
|
||||
let sql = include_str!("fix_low_ease.sql").replace("DECK_IDS", &ids);
|
||||
|
||||
self.db
|
||||
.prepare(&sql)?
|
||||
.execute(params![self.usn(server)?, TimestampSecs::now()])?;
|
||||
self.db.prepare(&sql)?.execute(params![self.usn(server)?])?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue