In this case a new entry has to be created in data.db
, table tags

where the new tag gets an id
, and this new tag (tagid
) is attached to your image assigning it to the imgid
of your image (table tagged_images
in library.db
).

Both databases (data.db
and library.db
) are beeing extendet and have to be tested. You can run an integrity check via command line (example for data.db on Ubuntu) :
cd ~/.config/darktable
cp data.db data.db.bak
sqlite3 data.db
sqlite> PRAGMA integrity_check;
ok
sqlite> .quit
The sqlite executable on Ubuntu is called sqlite3
. Here you find the documentation : Command Line Shell For SQLite
Then it seems unlikely that your database is damaged.
Quite understandable. But for this purpose you could possibly start with a fresh database on 3.8 and re-import the few images you need for your video. The new release 4.0 will come up soon.
Edit:
If you are not familiar with git you can download the source code for 3.8.1 release here : Release darktable 3.8.1 released · darktable-org/darktable · GitHub (scoll down to bottom of page, “Assets”).