Update the maxlength of the key field.