Can you try to delete this file?/var/lib/dnf/history.sqliteMaybe try to backup that file first, it might be useful for tracking down and fixing that bug.
Can you try to delete this file?/var/lib/dnf/history.sqlite