column=columns.find{|c|c.name==name.to_s}# In case the table doesn't exist we won't be able to find the column,# thus we will only check the type if the column is present.ifcolumn&&column.type!=:binaryraiseArgumentError,"sha_attribute #{name.inspect} is invalid since the column type is not :binary"endattribute(name,Gitlab::Database::ShaAttribute.new)endendend