mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
fix field ordinals on db check
This commit is contained in:
parent
c3833a6a10
commit
feaedccc9a
1 changed files with 6 additions and 1 deletions
|
@ -2306,7 +2306,7 @@ Return new path, relative to media dir."""
|
|||
if quick:
|
||||
num = 4
|
||||
else:
|
||||
num = 9
|
||||
num = 10
|
||||
self.startProgress(num)
|
||||
self.updateProgress(_("Checking integrity..."))
|
||||
if self.s.scalar("pragma integrity_check") != "ok":
|
||||
|
@ -2404,6 +2404,11 @@ select id from fields where factId not in (select id from facts)""")
|
|||
# fix any priorities
|
||||
self.updateProgress(_("Updating priorities..."))
|
||||
self.updateAllPriorities(dirty=False)
|
||||
# make sure
|
||||
self.updateProgress(_("Updating ordinals..."))
|
||||
self.s.statement("""
|
||||
update fields set ordinal = (select ordinal from fieldModels
|
||||
where id = fieldModelId)""")
|
||||
# fix problems with stripping html
|
||||
self.updateProgress(_("Rebuilding QA cache..."))
|
||||
fields = self.s.all("select id, value from fields")
|
||||
|
|
Loading…
Reference in a new issue