Anki/rslib/src/storage/revlog/fix_props.sql
2020-08-07 14:37:44 +10:00

7 lines
No EOL
354 B
SQL

update revlog
set ivl = min(max(round(ivl), -2147483648), 2147483647),
lastIvl = min(max(round(lastIvl), -2147483648), 2147483647),
time = min(max(round(time), 0), 2147483647)
where ivl != min(max(round(ivl), -2147483648), 2147483647)
or lastIvl != min(max(round(lastIvl), -2147483648), 2147483647)
or time != min(max(round(time), 0), 2147483647)