mirror of
https://github.com/ankitects/anki.git
synced 2025-11-17 01:57:12 -05:00
- on collection load, the schema is upgraded to 12 - on collection close, the changes are reversed so older clients can continue to open the collection - in the future, we could potentially skip the reversal except when exporting/doing a full sync - the same approach should work for decks, note types and tags in the future too - the deck list code needs updating to cache the deck confs for the life of the call
22 lines
No EOL
327 B
SQL
22 lines
No EOL
327 B
SQL
insert into deck_config (id, name, mtime_secs, usn, config)
|
|
values
|
|
(
|
|
(
|
|
case
|
|
when ?1 in (
|
|
select
|
|
id
|
|
from deck_config
|
|
) then (
|
|
select
|
|
max(id) + 1
|
|
from deck_config
|
|
)
|
|
else ?1
|
|
end
|
|
),
|
|
?,
|
|
?,
|
|
?,
|
|
?
|
|
); |