Looks like the new rails version has "change" versus self.up and self.down methods.
So what happens when one has to roll back a migration how does it know what actions to perform. I have the following method that I need to implement based on an online tutorial:
class AddImageToUsers < ActiveRecord::Migration
def self.up
add_column :users, :image_file_name, :string
add_column :users, :image_content_type, :string
add_column :users, :image_file_size, :integer
add_column :users, :image_updated_at, :datetime
end
def self.down
remove_column :users, :image_file_name, :string
remove_column :users, :image_content_type, :string
remove_column :users, :image_file_size, :integer
remove_column :users, :image_updated_at, :datetime
end
end
How can I do the same using the new change method?