I'd like to change an existing MySQL column from VARCHAR
to VARCHAR BINARY
in order to change it to be case-sensitive (see: https://stackoverflow.com/a/3396315/93995)
What's the proper migration syntax for this? I tried
change_column :my_table, :my_column, :binary, :limit => 255
but that tries to change it to a blob(255)
. Also complains:
Mysql2::Error: BLOB/TEXT column 'my_column' used in key specification without a key length: ALTER TABLE `my_table` CHANGE `my_column` `my_column` blob(255) DEFAULT NULL