mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
upgrade decks to fix odue bug
This commit is contained in:
parent
fd30167c49
commit
ae3e775fdd
2 changed files with 4 additions and 1 deletions
|
@ -42,7 +42,7 @@ MODEL_STD = 0
|
|||
MODEL_CLOZE = 1
|
||||
|
||||
# deck schema & syncing vars
|
||||
SCHEMA_VERSION = 4
|
||||
SCHEMA_VERSION = 5
|
||||
SYNC_ZIP_SIZE = int(2.5*1024*1024)
|
||||
SYNC_URL = os.environ.get("SYNC_URL") or "https://beta.ankiweb.net/sync/"
|
||||
SYNC_VER = 2
|
||||
|
|
|
@ -92,6 +92,9 @@ def _upgrade(col, ver):
|
|||
for m in clozes:
|
||||
_upgradeClozeModel(col, m)
|
||||
col.db.execute("update col set ver = 4")
|
||||
if ver < 5:
|
||||
col.db.execute("update cards set odue = 0 where queue = 2")
|
||||
col.db.execute("update col set ver = 5")
|
||||
|
||||
def _upgradeClozeModel(col, m):
|
||||
m['type'] = MODEL_CLOZE
|
||||
|
|
Loading…
Reference in a new issue