def indexes(table_name, name = nil)#:nodoc:
      indexes = []
      current_index = nil
      show_keys_from(table_name, name).each do |row|
        if current_index != row['Key_name']
          next if row['Key_name'] == "PRIMARY" # skip the primary key
          current_index = row['Key_name']
          indexes << ActiveRecord::ConnectionAdapters::IndexDefinition \
            .new(row['Table'], row['Key_name'], row['Non_unique'] == "0", [], row['Index_type'] == "SPATIAL")
        end
        indexes.last.columns << row['Column_name']
      end
      indexes
    end
def indexes(table_name, name = nil)#:nodoc:
      indexes = []
      current_index = nil
      show_keys_from(table_name, name).each do |row|
        if current_index != row['Key_name']
          next if row['Key_name'] == "PRIMARY" # skip the primary key
          current_index = row['Key_name']
          indexes << ActiveRecord::ConnectionAdapters::IndexDefinition \
            .new(row['Table'], row['Key_name'], row['Non_unique'] == "0", [], row['Index_type'] == "SPATIAL")
        end
        indexes.last.columns << row['Column_name']
      end
      indexes
    end
Check the nature of the index : If it is SPATIAL, it is indicated in the
 IndexDefinition object (redefined to add the spatial flag in
 spatial_adapter_common.rb)