Q:

Why directly changing a migrate file does not change the schema file?

My current migrate file is
class CreateMovies < ActiveRecord::Migration
  def up
    create_table :movies, :force => true do |t|
      t.string :title
      t.string :rating
      t.text :description
      t.datetime :release_date
      # Add fields that let Rails automatically keep track
      # of when movies are added or modified:
      t.timestamps
    end
  end

  def down
    drop_table :movies
  end
end

I try to change release_date type to integer. So I directly change the file to 
class CreateMovies < ActiveRecord::Migration
  def up
    create_table :movies, :force => true do |t|
      t.string :title
      t.string :rating
      t.text :description
      t.integer :release_date
      # Add fields that let Rails automatically keep track
      # of when movies are added or modified:
      t.timestamps
    end
  end

  def down
    drop_table :movies
  end
end

Please pay attention, the release_date type has been changed. But after I run

bundle exec rake db:migrate

It still produce the same schema file as before. I am so confused.

A:

It's probably because you've already run your migration. So before you want to change it, you should rollback it first:
bundle exec rake db:rollback

then you should modify it and run again:
bundle exec rake db:migrate

