mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
mod schema when rev order updated
This commit is contained in:
parent
9aad5c1166
commit
14b642f633
2 changed files with 3 additions and 1 deletions
|
@ -744,7 +744,9 @@ queue = 2 %s and due <= :lim order by %s limit %d""" % (
|
|||
# Dynamic indices
|
||||
##########################################################################
|
||||
|
||||
# fixme: warn user that the default is faster
|
||||
def updateDynamicIndices(self):
|
||||
"Call this after revOrder is changed. Bumps schema."
|
||||
# determine required columns
|
||||
required = []
|
||||
if self.deck.conf['revOrder'] in (
|
||||
|
@ -762,6 +764,7 @@ queue = 2 %s and due <= :lim order by %s limit %d""" % (
|
|||
self.deck.db.execute("create index ix_cards_multi on cards (%s)" %
|
||||
", ".join(cols))
|
||||
self.deck.db.execute("analyze")
|
||||
self.deck.modSchema()
|
||||
|
||||
# Resetting
|
||||
##########################################################################
|
||||
|
|
|
@ -130,7 +130,6 @@ class Syncer(object):
|
|||
self.mergeConf(rchg['conf'])
|
||||
|
||||
def finish(self, mod=None):
|
||||
# fixme: dynamic index?
|
||||
if not mod:
|
||||
# server side; we decide new mod time
|
||||
mod = intTime()
|
||||
|
|
Loading…
Reference in a new issue