Is there any way to change creation time of a note, or create a new note with a specified creation time (e.g. id) ? The only thing I could think of would be making a direct request to the database, which is not really beautiful. I don’t know whether it would break anything to do so, I don’t know why on rust, the features does not allow to flush card when the id is not already in the database, whether it’s only a check feature, or whether it ensure that some logic is maintened.
This would be useful at least for the add-on copy card, which can’t copy creation date anymore. (Technically, it never copied it, since ids are unique. But a difference of a few milliseconds is more acceptable than a difference of days or years)
Distinguishing between “add” and “update” is necessary to catch cards accidentally being added when the intention was to update them - which can happen if some code tries to flush a card object which has already been deleted on the DB end. This could have been done with separate functions rather than an id of 0, but using a zero id was the easiest way to integrate into the existing code at the time IIRC.
For now you can just use sql to replace the id after a new card is added - provided you do it before the user has a chance to review or sync, it should not cause problems.
Hello! I wanted to use your add-on so I forked it, but I just updated Qt5 so I don’t know how to solve that problem.(I’m not good with databases.)
This may have something to do with that. Add-on porting notes for Anki 2.1.45 : Undo/Redo
Hello @Shigeyuki, Thanks for the quick update so that users could still use it ! I’m trying to find back the full features (undo which is critical, and stay focused on the same card after the transfer) but I struggle eheh
I also read the Add-on porting notes for Anki 2.1.45 : Undo/Redo but could not find a solution