I am deploying my rails app for the first time and I got the following error:
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:
PG::UndefinedTable: ERROR: relation "opportunities" does not exist
Here is my opportunities model:
class Opportunity < 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
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
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??