aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/schema_dumper.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-05-09 12:42:48 +0100
committerPratik Naik <pratiknaik@gmail.com>2010-05-09 12:42:48 +0100
commit8d2f6c16e381f5fff6d3f24f5c73a443577a1488 (patch)
treec79dbfcd8945652f7bf746c05043acf537affbd0 /activerecord/lib/active_record/schema_dumper.rb
parentf75a6fec2947ce23bd3ca4911d2d798415ccd355 (diff)
downloadrails-8d2f6c16e381f5fff6d3f24f5c73a443577a1488.tar.gz
rails-8d2f6c16e381f5fff6d3f24f5c73a443577a1488.tar.bz2
rails-8d2f6c16e381f5fff6d3f24f5c73a443577a1488.zip
Revert "Revert "Add index length support for MySQL [#1852 state:open]""
This reverts commit 6626833db13a69786f9f6cd56b9f53c4017c3e39.
Diffstat (limited to 'activerecord/lib/active_record/schema_dumper.rb')
-rw-r--r--activerecord/lib/active_record/schema_dumper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/schema_dumper.rb b/activerecord/lib/active_record/schema_dumper.rb
index c8e1b4f53a..5cb639a300 100644
--- a/activerecord/lib/active_record/schema_dumper.rb
+++ b/activerecord/lib/active_record/schema_dumper.rb
@@ -177,6 +177,7 @@ HEADER
statment_parts << index.columns.inspect
statment_parts << (':name => ' + index.name.inspect)
statment_parts << ':unique => true' if index.unique
+ statment_parts << (':length => ' + Hash[*index.columns.zip(index.lengths).flatten].inspect) if index.lengths.compact.present?
' ' + statment_parts.join(', ')
end