rails/rails — pull request #10734 by frankapimenta (2013-05-23 07:33:55+00:00)
Title: add or remove timestamps to or from a table

Sometimes developers forget to add the timestamps to a table when creating it.

Migration generator now generates a migration to add or remove timestamps to or from a table automatically via CLI

rails generate migration add_timestamps_to_users
class AddTimestampsToUsers < ActiveRecord::Migration
def change
add_timestamps :users
end
end

rails generate migration remove_timestamps_from_users
class RemoveTimestampsFromUsers < ActiveRecord::Migration
def change
remove_timestamps :users
end
end