title: Add a reference column migration in Rails 4
body: <p>A user has many uploads. I want to add a column to the <code>uploads</code> table that references the <code>user</code>. What should the migration look like? </p>
  
  <p>Here is what I have. I'm not sure if I should use (1) <code>:user_id, :int</code> or (2) <code>:user, :references</code>. I'm not even sure if (2) works. Just trying to do this the "rails" way.</p>
  
  <pre><code>class AddUserToUploads &lt; ActiveRecord::Migration
    def change
      add_column :uploads, :user_id, :integer
    end
  end
  </code></pre>
  
  <p>Relevant question except for Rails 3. <a href="https://stackoverflow.com/questions/4954969/rails-3-migrations-adding-reference-column">Rails 3 migrations: Adding reference column?</a></p>