title: Why I can't migrate index to my database scheme
body: <p>I generate a table by using</p>
  
  <p>rails generate model Relationship follower_id:integer followed_id:integer</p>
  
  <p>Then, I add my index as follows</p>
  
  <pre><code>class CreateRelationships &lt; ActiveRecord::Migration
    def change
      create_table :relationships do |t|
        t.integer :follower_id
        t.integer :followed_id
  
        t.timestamps null: false
      end
      add_index :relationships, :follower_id
      add_index :relationships, :followed_id
      add_index :relationships, [:follower_id, :followed_id], unique: true
    end
  end
  </code></pre>
  
  <p>After that I ran rake db:migrate
    <code>rake db:migrate</code></p>
  
  <pre><code>== 20170922165845 CreateRelationships: migrating ==============================
  
  -- create_table(:relationships)
  
  -&gt; 0.0010s
  
  == 20170922165845 CreateRelationships: migrated (0.0011s) =====================
  </code></pre>
  
  <p>Why is it not migrating index?</p>
  
  <p>schema.rb </p>
  
  <pre><code>ActiveRecord::Schema.define(version: 20170922181915) do 
    #...
    create_table "relationships", force: :cascade do |t| 
      t.datetime "created_at", null: false 
      t.datetime "updated_at", null: false 
    end
    #...
  end
  </code></pre>