title: t.references in the migration vs belongs_to in the model?
body: <p>I was reading the Rails Guides and I found these lines of code:</p>
  
  <pre><code>  class CreateComments &lt; ActiveRecord::Migration
       def change
         create_table :comments do |t|
            t.string :commenter
            t.text :body
            t.references :post
  
            t.timestamps
         end
  
         add_index :comments, :post_id
       end
   end
  </code></pre>
  
  <p>I also read Michael Hartl's book, Rails Tutorial and I did not find anything about the "t.references" used in the code above.
  What does it do? In Michael's book I used has_many and belongs_to relations in the model and nothing in the migrations(not event t.belongs_to).</p>