A while ago, I reset my Darktable database. I don’t organize my raws, but my JPEGs instead, so this is fine.
However, Darktable thus forgot which photos were already imported, which makes importing from half-full memory cards a bit cumbersome. I like to keep my full memory cards as mementos, and last line of backup, so a half-full card is the norm for me.
Is there a way of telling Darktable about already-imported photos? I’m not afraid of hand-slinging some SQL if necessary.
Change the file ending of your raws on the card after importing. eg, Sony .ARW to .ARx. Darktable won’t see them as raws, but if you ever need to revert to that last-line backup, you know what you did, and you just change back again.
Easily scripted to deal with an entire folder or even an entire card.
If by “reset” you mean you deleted library.db and started with a new one from scratch then any SQL on the new database won’t help.
If you still have the old database available, you could create a list of the image files imported into this database by reading images.filename. Simple example : select filename from images where id < 1000
For each image.id there is a corresponding entry in table film_rolls which could be used to determine the full path to this image file (film_rolls.folder).
If you have created a sidecar file when importing the image files, the already imported images could also be determined via the existence of these xmp files.