Fix installhistory

serial_number is not UNIQUE