This project is archived and is in readonly mode.

Changeset [3616141fa2d2f35675d5962a1b329c8c51a5e9a3] by Emili Parreno

May 8th, 2010 @ 12:43 PM

Add index length support for MySQL [#1852 state:resolved]


add_index(:accounts, :name, :name => 'by_name', :length => 10) => CREATE INDEX by_name ON accounts(name(10))

add_index(:accounts, [:name, :surname], :name => 'by_name_surname', :length => {:name => 10, :surname => 15}) => CREATE INDEX by_name_surname ON accounts(name(10), surname(15))

Signed-off-by: Pratik Naik

Committed by Emili Parreno

  • M activerecord/CHANGELOG
  • M activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
  • M activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
  • M activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
  • M activerecord/lib/active_record/schema_dumper.rb
  • M activerecord/test/cases/active_schema_test_mysql.rb
  • M activerecord/test/cases/migration_test.rb

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>