mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 07:07:13 -05:00
- notes with wrong field count are now recovered instead of being deleted - notes with missing note types are now recovered - notes with missing cards are now recovered - recover_missing_deck() still needs implementing - checks required
27 lines
No EOL
436 B
SQL
27 lines
No EOL
436 B
SQL
update cards
|
|
set
|
|
odue = (
|
|
case
|
|
when odue > 0
|
|
and (
|
|
type = 1
|
|
or queue = 2
|
|
)
|
|
and not odid then 0
|
|
else min(max(round(odue), -2147483648), 2147483647)
|
|
end
|
|
),
|
|
mod = ?1,
|
|
usn = ?2
|
|
where
|
|
odue != (
|
|
case
|
|
when odue > 0
|
|
and (
|
|
type = 1
|
|
or queue = 2
|
|
)
|
|
and not odid then 0
|
|
else min(max(round(odue), -2147483648), 2147483647)
|
|
end
|
|
); |