According to Rails doc: http://guides.rubyonrails.org/migrations.html
"Active Record tracks which migrations have already been run so all you have to do is update your source and run rake db:migrate."
How does ActiveRecord actually do this? Where does Active Record store the data?
I suspect this might be stored in the database itself? In a table somewhere.
On my development machine, I ran all the migrations. Then I copied the production database over using mysqldump. Then I ran "rake db:migrate:status", it shows correctly the migrations that need to run on the production database.
I used to think that ActiveRecord keeps track of the last migration run using the timestamp. But I think this is not true because ActiveRecord correctly runs the "older" migrations merged in from another code branch.
Could someone with inside knowledge of this elaborate? Thanks