with the index name('index name too long') you can solve with the :name option. Something like :name => 'my_index'. * run `rails g migration AddMissingIndexes` and add the following content: class AddMissingIndexes < ActiveRecord::Migration def change add_index :cakes, :user_id end end Wednesday, 19 June, 13