Skip to content

Commit

Permalink
set IndexDefinition#length
Browse files Browse the repository at this point in the history
  • Loading branch information
kyanagi committed Sep 4, 2010
1 parent 98fbeb6 commit 020f0ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/active_record/connection_adapters/mysql2_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,11 @@ def indexes(table_name, name = nil)
if current_index != row[:Key_name]
next if row[:Key_name] == PRIMARY # skip the primary key
current_index = row[:Key_name]
indexes << IndexDefinition.new(row[:Table], row[:Key_name], row[:Non_unique] == 0, [])
indexes << IndexDefinition.new(row[:Table], row[:Key_name], row[:Non_unique] == 0, [], [])
end

indexes.last.columns << row[:Column_name]
indexes.last.lengths << row[:Sub_part]
end
indexes
end
Expand Down

0 comments on commit 020f0ff

Please sign in to comment.