Quote:
Originally Posted by Mister L
I couldn't find how to do that in SQLite Expert Personal but I installed SQLiteStudio and DB Browser and it is possible to do it there. I made a test export in csv format and it worked fine (yay). I even was able to modify the bookmarks in the database (filepath) for one book which had been accidentally transferred at the root of the memory, so I could put it in the "books" folder where it belongs without losing the annotations.
|
That's good.
Quote:
However then I tried to import the exported table back to the database, just to check how it worked and I got that bleeding unique error again:
Code:
Error while importing data: UNIQUE constraint failed: Bookmark.BookmarkID
Is this because the database I'm importing into has that error (not a problem since I am not keeping it), or is the Bookmarks table itself corrupted (problem)? I tried to sort the csv file by BookmarkID and then skim quickly the file to see if I could find the duplicate and I didn't see one (using a proportional-width font so that 2 same IDs would be easy(-ier) to see) but that doesn't mean it definitely isn't there.
|
As the error is happening while importing the data, it will be because the BookmarkID is already in the table and you are adding a second. The BookmarkID is generated for each entry and looks to be a GUID. Generating the same on two devices would be pretty surprising. It is most likely for a purchased book. These are synced between the devices. In the CSV, the entries for the sideloaded books will have the VolumeID starting with "file:///". If the VolumeID does not start with that, it is for a purchased book. If you delete all the entries in the file that are not for your sideloaded books, then it should remove the potential duplicates.
Quote:
Oh excellent, that's a great idea, I hadn't thought of adding them in Calibre. I must not have the latest firmware because I don't have the "Exported Annotations" folder, should I update first? Will the database error be affected one way or another if I do?
|
Updating the firmware won't affect this error. But, there is a slight chance that it could cause problems with the upgrade. Some firmware upgrades alter the tables by adding columns. It's possible that this could fail because of the error. It would depend on what firmware you are currently running and hence what changes need to be made. As the error is with the content table, it could be a problem if this needs to be changed. I'd probably wait to do the upgrade until you sort everything else out.