lib/ridgepole/dsl_parser.rb in ridgepole-0.6.5.beta3 vs lib/ridgepole/dsl_parser.rb in ridgepole-0.6.5.beta4

- old
+ new

@@ -182,9 +182,18 @@ if @__definition[table_name][:indices][idx] raise "Index `#{table_name}(#{idx})` already defined" end + if options[:length].is_a?(Numeric) + index_length = options[:length] + options[:length] = {} + + column_name.each do |col| + options[:length][col] = index_length + end + end + @__definition[table_name][:indices][idx] = { :column_name => column_name, :options => options, } end