Fixing D-10926: Missing Entries

Please double check this pull request carefully. Make sure all the entryid references in the sql have been replaced with id references.