title: Rake db:migrate error 'PG::UndefinedColumn: ERROR: column "slug" does not exist'
body: <p>I am cloning my own repo on to my local machine that another developer has done some work on. I am trying to migrate the database and receiving this error:</p>
  
  <pre><code>/Users/lewisfrost/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.0.1/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now
  DEPRECATION WARNING: Support for Rails &lt; 4.1.0 will be dropped. (called from &lt;top (required)&gt; at /Users/lewisfrost/frostfires/config/application.rb:8)
  ==  AddUploadFileToAnswer: migrating ==========================================
  -- add_column(:answers, :upload_file, :string)
     -&gt; 0.0006s
  -- add_index(:answers, :slug)
  rake aborted!
  StandardError: An error has occurred, this and all later migrations canceled:
  
  PG::UndefinedColumn: ERROR:  column "slug" does not exist
  : CREATE  INDEX  "index_answers_on_slug" ON "answers"  ("slug")/Users/lewisfrost/frostfires/db/migrate/20140126204815_add_upload_file_to_answer.rb:4:in `change'
  ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column "slug" does not exist
  : CREATE  INDEX  "index_answers_on_slug" ON "answers"  ("slug")
  /Users/lewisfrost/frostfires/db/migrate/20140126204815_add_upload_file_to_answer.rb:4:in `change'
  PG::UndefinedColumn: ERROR:  column "slug" does not exist
  /Users/lewisfrost/frostfires/db/migrate/20140126204815_add_upload_file_to_answer.rb:4:in `change'
  Tasks: TOP =&gt; db:migrate
  (See full trace by running task with --trace)
  </code></pre>
  
  <p>SCHEMA.rb</p>
  
  <pre><code>  create_table "answers", force: true do |t|
      t.string   "user"
      t.text     "body"
      t.integer  "question_id"
      t.datetime "created_at"
      t.datetime "updated_at"
      t.integer  "user_id"
      t.string   "upload_file"
      t.string   "slug"
    end
  </code></pre>
  
  <p>Migration file</p>
  
  <pre><code>class AddUploadFileToAnswer &lt; ActiveRecord::Migration
    def change
      add_column :answers, :upload_file, :string
      add_index :answers, :slug
  
    end
  end
  </code></pre>
  
  <p>Any advice is great</p>