mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
fix ordinals instead of aborting upgrade
This commit is contained in:
parent
b165ef3980
commit
c371d318a2
1 changed files with 3 additions and 5 deletions
|
@ -90,11 +90,9 @@ f.id = cards.factId)"""):
|
||||||
if db.list("""
|
if db.list("""
|
||||||
select id from fields where factId not in (select id from facts)"""):
|
select id from fields where factId not in (select id from facts)"""):
|
||||||
return
|
return
|
||||||
# fields without matching interval
|
# fix ordinal numbers
|
||||||
if db.list("""
|
db.execute("""update fields set ordinal = (select ordinal from
|
||||||
select id from fields where ordinal != (select ordinal from fieldModels
|
fieldModels where id = fieldModelId)""")
|
||||||
where id = fieldModelId)"""):
|
|
||||||
return
|
|
||||||
# incorrect types
|
# incorrect types
|
||||||
if db.list("""
|
if db.list("""
|
||||||
select id from cards where relativeDelay != (case
|
select id from cards where relativeDelay != (case
|
||||||
|
|
Loading…
Reference in a new issue