Rollback Item ID counter after failing to import records correctly via CSV importer

Hi there,

How do you go about resetting the Item ID back to XXX after failing to import tens of thousands of records in Omeka by mistake. Unfo the CSV importer had unintentionally imported many records with “blank” values because it recognised a blank row as a record (possibly due to changing in between formats from XSLT to CSV). We had deleted the erroneous records but now the Item ID number is 40,567 when really it should be 20,000.

How do we rollback the Item ID number - is this done via the Omeka application (somewhere in the Admin dashboard) or is it a matter of manually resetting it in the MySQL database? If we need to configure the database, which db tables do we need to update as I imagine there will be several tables and do we need to also delete the empty records or should this be left alone?

Please help!
Jenny

Yes, you’ll have a lot of work via sql to fix it, since the item id can be found in many tables.

So the simplest way is to use a backup and to reimport the items. If you don’t have backup, use the undo job of Csv Import, then reset the id in sql (via an alter table xxx auto_increment = xxx;).

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