Anki/rslib/src/storage/deckconf/add.sql
Damien Elmes 35c03af520 split deck config into separate SQL table
- 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
2020-03-30 20:01:16 +10:00

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
),
?,
?,
?,
?
);