It’s possible to delete this data, it is just not simple.
Make a backup copy of the database
Take a database schema sqlite3 pieceinfo.db ".schema"
Create a temporary copy of this table, but without FK
Insert there only valid data
Drop the source table
Create it back and insert all data from a temporary table
Drop the temporary table
However, in my case this table is empty, because this info was migrated to the pieces itself several years ago, the same for orders.db, because they are migrated to the orders folder near the config.yaml file.
So, I believe it would be simpler just recreate the database in question.
No. There are migrations. There are several not used databases, but we cannot easily drop them because of migrations and some links in the code.
Seems your node somehow missed some migrations or there was problems during applying.