Anki changed the rating stats when exporting the deck

Hello, a couple of week ago I exported my deck with the scheduling information, however I have noticed that in the “Answer Butttons” section in stats, all the learning cards have changed their rating from button 3 to button 4. Even though, I only pay attention to the young and mature cards stats, this pisses me off, because it shows like if I have clicked “easy” thousands of times when the cards where in their learning phase. I do not know what to do to correct this.

If you’ve never used button 4, you can correct your stats to show button 3 instead with the following in the debug console. It will require a one-way sync afterwards.

mw.col.db.execute("update revlog set ease=3 where ease=4")
mw.col.modSchema(check=False)

https://docs.ankiweb.net/misc.html#debug-console

As for why this happened, can you provide me with a list of steps to reproduce it? I tried exporting a collection with only grade 3 answers into an apkg file with scheduling included, but when I import it into a new profile, the grade is still shown as 3.

I have used button 4 a few times, but not all. Yes, I exported my deck with the scheduling included, when I imported it had already changed. I tried creating a new profile, and it was the same. I exported the deck using the V2 scheduler, but for example when I imported it in a new profile (without updating it to the V2 scheduler) it was fine, but as soon I updated to the V2 scheduler it was automatically changed.

Thanks, this is a bug. The code was checking for this case, but the check was incorrect. A fix will be in the next update.

If the majority of your answers were good, I’d recommend using the code above. Your previous Easy answers will appear as Good, but it does not alter the scheduling, only your review history.

Thanks, is there any chance to use the code above until a specific date? I want to correct everything before the date the problem began.

Should limit it to items reviewed xxx days in the past or earlier.

Hello, it doesn’t work. It shows me this:

mw.col.db.execute(“update revlog set ease=3 where ease=4 where id < (1624661336-86400*22)*1000”)
… mw.col.modSchema(check=False)
Traceback (most recent call last):
File “aqt/main.py”, line 1466, in onDebugRet
File “”, line 1, in
File “anki/dbproxy.py”, line 66, in all
File “anki/dbproxy.py”, line 60, in _query
File “anki/_backend/init.py”, line 60, in db_query
File “anki/_backend/init.py”, line 83, in _db_command
anki.errors.DBError: DBError { info: “SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some(“near \“where\”: syntax error”))”, kind: Other }

Also, I tried with:
mw.col.db.execute(“update revlog set ease=3 where ease=4 where id < 1622955600000”)
mw.col.modSchema(check=False)

And it shows me the same error. I want to change everything before June 6th, 2021 (1622955600000).

Sorry, that should have read

mw.col.db.execute("update revlog set ease=3 where ease=4 and id < (1624661336-86400*xxx)*1000")
mw.col.modSchema(check=False)