spatial_adapter/common/schema_definitions.rb overloads ActiveRecord::ConnectionAdapters::IndexDefinition with a new constructor to add a spatial parameter, however fails to preserve the "lengths" parameter.
This can cause a crash in certain db migration scripts using add_index.
Rails 3.0.10
IndexDefinition < Struct.new(:table, :name, :unique, :columns, :lengths)
https://github.com/rails/rails/blob/4f15f392601d4504fab850f3bf659c43f0cb51ec/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
It appears the lengths attribute was added on May 09, 2010 during the rails 2.3 series
rails/rails@8d2f6c1
Looks like any fix will need to accomodate both constructor signatures given support for AR >=2.2.2