setupDb checks for missing links