def ensure_valid_field!(field)
      if self.class.columns_hash["#{field}"].nil?
        raise ArgumentError, "Column :#{field} does not exist"
      elsif !%i(text binary).include?(self.class.columns_hash["#{field}"].type)
        raise ArgumentError, "Column :#{field} must be of type 'text' or 'binary' \
to be used for encryption"
      end
    end
def ensure_valid_field!(field)
      if self.class.columns_hash["#{field}"].nil?
        raise ArgumentError, "Column :#{field} does not exist"
      elsif !%i(text binary).include?(self.class.columns_hash["#{field}"].type)
        raise ArgumentError, "Column :#{field} must be of type 'text' or 'binary' \
to be used for encryption"
      end
    end
Public: Ensures that each field exist and is of type text. This prevents
 encrypted data from being truncated.