Rails migrations are used to track and apply database alterations in a reversible manner.
Migrations are a way to alter your database in a reversible manner using (usually) Ruby classes and objects rather than raw SQL. Rails also keeps track of which migrations have run so a simple
$ rake db:migrate
is all that is needed to bring your database up to date even if different people have made different changes. The migrations also maintain your db/schema.rb
file.
Links: