Zotero Library Database - item_id changes over time?
I had to export a Zotero library items back in 2015 and was using the item_id as the unique identifier in my database. Due to some issues in the server where the data was being imported I had to redo the exportation, only to realize the item_id had changed which resulted in conflicts with other relationships. Im assuming that Zotero updated the item_id automatically (maybe for organizational reasons, fragmentation, etc).
I am not quite familiarized with Zotero and it wasn't me making the library initial configuration.
Is this the default behaviour of Zotero or can it be configured to preserve the original item_id? And if this is the only way to go, is there a unique field for the items that stays the same over time?
I am not quite familiarized with Zotero and it wasn't me making the library initial configuration.
Is this the default behaviour of Zotero or can it be configured to preserve the original item_id? And if this is the only way to go, is there a unique field for the items that stays the same over time?
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
Upgrade Storage
But also - the item_id I'm talking about isn't in standard export formats I believe, so you may be talking about something else?
Example:
c:\users\xpto\sqlite\sqlite-tools-win32-x86-3250100\sqlite3.exe c:\users\xpto\Zotero\zotero.sqlite
>.output zotero_dump.sql
>.dump
This generates the SQL file from where I import the data. In this file there is an items table that contains the item_id as the primary key. This ID is what changes between exports. Maybe I should be exporting the data directly from your API? Is there an easy way to do so?
userID and groupID are both in the database (if this database has ever been synced), but if this is just a single library you don't need to worry about them and can rely on the item key alone to uniquely identify an item in any synced versions of that library.