repairIDs function

Repair Missing IDs