modified migration to replace missing UIDs with 0