Implemented UUID database upgrade. Code has been unchecked in for months, so it's slightly suspect and should be tested heavily.