remove_index missed quote_table_name

in lib/active_record/connection_adapters/abstract/schema_statements.rb there is a missing quote_table_name in line 286 (def remove_index):

execute "DROP INDEX #{quote_column_name(index_name(table_name, options))} ON #{table_name}"

so my "keys" table can get an index with "add_index" but can't remove it (without tweaking)

replacing it to

execute "DROP INDEX #{quote_column_name(index_name(table_name, options))} ON #{quote_table_name(table_name)}"

would help (and would be logical).

Best regards Savar

see also:

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4300-remove_index-doesnt-quote-table_name#ticket-4300-3

You'll want to add a test showing the failing case, and succeeding after your change. A table name of `index` or `on` or something.