'Reviewed cards a few days prior' synced to PC became backlogs

Hello, 2-year anki user here.
Long story short, I tried syncing my ankidroid progress to pc through ankiweb like the usual, and after doing so, the review schedules got slightly damaged (particularly the reviews on the past few days). For the record, it’s totally not my fault for disabling backups (I may have trusted anki’s algorithm a bit too much).

Anyway, as for today, I’m trying to use DB browser to tamper with the database and see if I could just move stuff around to fix it, because the supposed due date from the card info is still intact, but anki reports those cards as backlogs. The backlog date on each card are the same as the last time I answered them.

card infos:

db tables:

In the photos above, I screen-capped anki’s report on two samples of card infos for both a normal (due tomorrow) and a broken card (under ‘prop:due=-4’, supposedly only due today), together with the data shown in DB browser where table values about these cards are located.
I have a tiny bit knowledge on executing some SQL commands. My main problem is how do I get the due value for the broken cards using its latest review date’s date and interval.

Apologies for my amazing English usage. I could provide more screenshots as needed. Thank you all in advanced for paying some time to provide possible and or better solutions.

For the devs who might be interested on how I triggered this bug, here are the usual steps I take:

  1. Sync both PC and mobile through AnkiWeb
  2. Stop syncing in PC for some days, but keep doing reps in mobile
  3. Sync the mobile first, then sync the PC
  4. Rebuild a filtered deck that filters a deck (w/ ‘is:due’)

(This routine has always been successful until today when the decks are showing significantly more due cards than usual so I thought I just forgot to sync the mobile first)
5. So I synced the mobile again.(Or I may have resynced the PC again first)
6. The mobile now shows the same abnormal amount of due cards as the PC.

I use the V2 scheduler with 4 hours daily grace period, and I run a handful of addons.

okay so, I partially fixed it after a long while of trying. This article gave me some idea on how the database works. I managed to get the due dates back in place, but their respective step positions are a lost cause, so some of them just had to be answered as ‘Again’, and others considered as ‘Hard’.

The solution involved some SQL execution, and calculating or copy pasting of the results between text editors and spreadsheets.

First, remove the broken cards from the filter decks and place them on a different deck.
Then get the all the id of the isolated cards from cards table:

FROM cards 
WHERE did=:idOfDeckOfBrokenCards;

Instead of DB browser, I had to use sqlite3 so I could grab the result of every query to get each broken card’s latest ivl in revlog table:

FROM revlog 
WHERE cid=:idOfBrokenCard 

I placed the ivl values in a spreadsheet and converted all negative values from seconds to days (simply: -XXX / 86400).

Lastly, I added those values to each of the card’s current interval respectively in the cards table:

UPDATE cards 
SET due=:reviewIntervalInDays+carddue 
WHERE id=:idOfBrokenCard;

These SQL commands can probably be compressed to a one-liner.
I couldn’t pay more time to fix the step positions. All I could do was at least reduce my daily due cards.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.