title: Rails: How to add add_index to existing table
body: <p>I already migrated a table called units with several columns. I was wondering how to migrate in a stand alone 'add_index' to this table using the cmd. Is this code correct:</p>
  
  <pre><code>class AddIndexToUnits &lt; ActiveRecord::Migration
    def self.up
      add_index :units, :lesson_id
    end
  
    def self.down
      remove :units
    end
  end
  </code></pre>
  
  <p>I have a feeling the self.down could be wrong, I am unsure.</p>