From 0f0bd5a0011f6324f16b272fc33d074e6354cc59 Mon Sep 17 00:00:00 2001 From: Kouhei Yanagita Date: Sat, 4 Sep 2010 20:39:55 +0800 Subject: [PATCH] set IndexDefinition#length --- lib/active_record/connection_adapters/mysql2_adapter.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/active_record/connection_adapters/mysql2_adapter.rb b/lib/active_record/connection_adapters/mysql2_adapter.rb index e4ab71d..78a7901 100644 --- a/lib/active_record/connection_adapters/mysql2_adapter.rb +++ b/lib/active_record/connection_adapters/mysql2_adapter.rb @@ -447,10 +447,11 @@ module ActiveRecord 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