From 2858e31387616f2a3a3b149571a3e09f2dabb7b8 Mon Sep 17 00:00:00 2001 From: Aditya Kapoor Date: Thu, 21 Aug 2014 00:53:26 +0530 Subject: [ci skip] correct docs about the migration generation --- activerecord/lib/active_record/migration.rb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index 659c5e3bbb..9219d70c65 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -161,21 +161,14 @@ module ActiveRecord # in the db/migrate/ directory where timestamp is the # UTC formatted date and time that the migration was generated. # - # You may then edit the up and down methods of - # MyNewMigration. - # # There is a special syntactic shortcut to generate migrations that add fields to a table. # # rails generate migration add_fieldname_to_tablename fieldname:string # # This will generate the file timestamp_add_fieldname_to_tablename, which will look like this: # class AddFieldnameToTablename < ActiveRecord::Migration - # def up - # add_column :tablenames, :fieldname, :string - # end - # - # def down - # remove_column :tablenames, :fieldname + # def change + # add_column :tablenames, :field, :string # end # end # -- cgit v1.2.3