title: heroku deployment error ruby on rails undefinedtable
body: <p>I am deploying my rails app for the first time and I got the following error:</p>
  
  <blockquote>
    <p>Migrating to Changetimezone (20140605033929)
    == 20140605033929 Changetimezone: migrating ===================================
    -- change_column(:opportunities, :updated_at, :date) PG::UndefinedTable: ERROR:  relation "opportunities" does not exist :
    ALTER TABLE "opportunities" ALTER COLUMN "updated_at" TYPE date rake
    aborted! StandardError: An error has occurred, this and all later
    migrations canceled:</p>
    
    <p>PG::UndefinedTable: ERROR:  relation "opportunities" does not exist</p>
  </blockquote>
  
  <p>Here is my opportunities model:</p>
  
  <pre><code>class Opportunity &lt; ActiveRecord::Base
  before_save :check_for_nil,:calculate_derated_value
  has_many :updates, dependent: :destroy
  has_many :activities, dependent: :destroy   
  has_many :contacts, dependent: :destroy
  has_many :links, dependent: :destroy
  </code></pre>
  
  <p>Clearly, it has associations. I'm not sure why the complaint is that it doesn't have associations... all the models that belong to it have a :belongs_to opportunities declaration</p>
  
  <p>I'm at a complete loss of what might be going on. I've tried searching but I can't find any solutions that fix this exact problem.. does anyone have any ideas??</p>