In Rails 3.1 ActiveRecord::Migration we can define only one method
change
It`s 'reversible' migrations. You just implement 'up' version and Migration system generate for you methods to create revers migration.
For example:
class CreateWagons < ActiveRecord::Migration def change create_table :wagons do |t| t.integer :number t.integer :mileage t.datetime :build_date end end end
Rails known how to revert this commands:
add_column add_index add_timestamp create_table remove_timestamps rename_column rename_index rename_table
I think it`s one more beautiful issues that presents to us Rails platform.