title: rake migrate aborted for undefined local variable or method
body: <p>Got a issue when i run rake db:migrate. The mistake message is like</p>
  
  <pre><code>-- create_table(:addresses)
     -&gt; 0.1792s
  -- contact_id()
  rake aborted!
  An error has occurred, this and all later migrations canceled:
  
  undefined local variable or method `contact_id' for #&lt;CreateAddresses:0x00000001724718&gt;/var/lib/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/migration.rb:465:in `block in method_missing'
  </code></pre>
  
  <p>And i used command before migrate</p>
  
  <pre><code>rails g model address street:string city:string region:string postalcode:string country:string contact_id:integer
  </code></pre>
  
  <p>And my migration file :</p>
  
  <pre><code>class CreateAddresses &lt; ActiveRecord::Migration
    def change
      create_table :addresses do |t|
        t.string :street
        t.string :city
        t.string :region
        t.string :postalcode
        t.string :country
        t.integer :contact_id
  
        t.timestamps
      end
      add_index :addresses, [contact_id, :create_at]
    end
  end
  </code></pre>
  
  <p>Could anybody tell where i made mistake please?  Thank you a lot.</p>