This project is archived and is in readonly mode.

#4809 ✓resolved
pupeno@pupeno.com

[PATCH] Table name not escaped on dropping index

Reported by pupeno@pupeno.com | June 9th, 2010 @ 05:04 PM | in 3.0.2

While this works just fine:

add_index :values, [:field_id, :user_id]

this doesn't work:

remove_index :values, :column => [:field_id, :user_id]

failing with this error:

Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'values' at line 1: DROP INDEX index_values_on_field_id_and_user_id ON values

I think the issue is that values is not escaped at the end of that query, if it generated

DROP INDEX `index_values_on_field_id_and_user_id` ON `values`

it might work.

Comments and changes to this ticket

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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages