提交 e3a3a14c 编写于 作者: S Santiago Pastorino

Merge pull request #5882 from vijaydev/fix_generated_attribute_build

Fixing the build
......@@ -22,8 +22,10 @@ def parse(column_definition)
type, attr_options = *parse_type_and_options(type)
references_index = type.in?(%w(references belongs_to)) && UNIQ_INDEX_OPTIONS.include?(has_index) ? {:unique => true} : true
attr_options.merge!({:index => references_index}) if references_index
if type.in?(%w(references belongs_to))
references_index = UNIQ_INDEX_OPTIONS.include?(has_index) ? {:unique => true} : true
attr_options.merge!({:index => references_index})
end
new(name, type, has_index, attr_options)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册