I have a column name called 'order' in two of my db tables.
I have just realized that it is causing some problems since 'order' is
a reserved word in mysql.
Unfortunately, trying to run a migration that includes...
rename_column :images_piles, :order, :sequence
...results in a mysql error (see below). Is there anyway way to run a
successful migration that forces mysql to treat 'order' as a column
name?
i've hit this problem before when i had a column named 'group' in my
table. i looked into the behavior because i noticed that rails,
specifically ActiveRecord, does add backticks some of the time, but
not all the time.
i even went in and forced it to use the reserved word by creating the
table manually from the cl and even though that worked, when i
attempted to add a new record, it blew up because AR wasn't adding
backticks on the insert.
in the end, it was just easier to change the column name.