title: Adding index :unique to a column in ruby on rails via generate migration
body: <p>I know that i can touch a migration and add</p>
  
  <pre><code>add_index :table_name, :column_name, :unique =&gt; true
  </code></pre>
  
  <p>But how is the right rails migration command to generate this?</p>
  
  <pre><code>rails g migration add_index_to_column_name :column_name, :unique =&gt; true
  </code></pre>
  
  <p>Is that right?</p>
  
  <p>In my special example I have a table customers</p>
  
  <pre><code>  t.integer :customerID
    t.string :surname
    t.string :first_name
    t.string :phone
  </code></pre>
  
  <p>an i want to set the customerID to unique. Tried</p>
  
  <pre><code>rails g migration AddIndexToCustomers :customerID, :unique =&gt; true 
  </code></pre>
  
  <p>But if i look to my migration file after this, it dont look right see this:</p>
  
  <pre><code>def change
      add_column :customers, :, :customerID,
      add_column :customers, :, :unique
      add_column :customers, :=, :string
    end
  </code></pre>
  
  <p>Any idea or suggestion?</p>