mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
work around sqlalchemy problem
This commit is contained in:
parent
2352502807
commit
9fed5e2bc1
1 changed files with 7 additions and 1 deletions
|
@ -69,7 +69,7 @@ SEARCH_FIELD = 6
|
|||
SEARCH_FIELD_EXISTS = 7
|
||||
SEARCH_QA = 8
|
||||
SEARCH_PHRASE_WB = 9
|
||||
DECK_VERSION = 53
|
||||
DECK_VERSION = 54
|
||||
|
||||
deckVarsTable = Table(
|
||||
'deckVars', metadata,
|
||||
|
@ -4252,6 +4252,12 @@ syncing again via Settings>Deck Properties>Synchronsiation. \
|
|||
deck.hardIntervalMax = max(1.1, deck.hardIntervalMax)
|
||||
deck.version = 53
|
||||
deck.s.commit()
|
||||
if deck.version < 54:
|
||||
# broken versions of the DB orm die if this is a bool with a
|
||||
# non-int value
|
||||
deck.s.statement("update fieldModels set editFontFamily = 1");
|
||||
deck.version = 54
|
||||
deck.s.commit()
|
||||
# executing a pragma here is very slow on large decks, so we store
|
||||
# our own record
|
||||
if not deck.getInt("pageSize") == 4096:
|
||||
|
|
Loading…
Reference in a new issue