add_index :brochures,
[:request_for_brochure_id, :cemetery_id, :stone_shop_id],
:unique=>true
こんな感じでインデックス作ったら・・・
Mysql::Error: Identifier name 'index_brochures_on_request_for_brochure_id_and_cemetery_id_and_stone_shop_id' is too long: CREATE UNIQUE INDEX `index_brochures_on_request_for_brochure_id_and_cemetery_id_and_stone_shop_id` ON `brochures` (`request_for_brochure`, `cemetery_id`, `stone_shop_id`)
インデックス名長杉。
資料請求がrequest_for_brochuresはちょっと長過ぎたか、、、
add_index :brochures,
[:request_for_brochure_id, :cemetery_id, :stone_shop_id],
:unique => true,
:name => 'index_brochures_on_rfb_id_and_cemetery_id_and_stone_shop_id'
修正。