aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2014-08-20 16:26:31 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2014-08-20 16:26:31 -0300
commit2b7d67d49df8b88ef4815199f2ce5c11f09fe06f (patch)
tree448549feb1408cb311c8ef8da612207f41ee59f8 /activerecord
parentcd1a0452be7b2f1827db5a8fe0a93bd7b7e78096 (diff)
parent2858e31387616f2a3a3b149571a3e09f2dabb7b8 (diff)
downloadrails-2b7d67d49df8b88ef4815199f2ce5c11f09fe06f.tar.gz
rails-2b7d67d49df8b88ef4815199f2ce5c11f09fe06f.tar.bz2
rails-2b7d67d49df8b88ef4815199f2ce5c11f09fe06f.zip
Merge pull request #16592 from aditya-kapoor/fix-migration-docs
[ci skip] correct docs about the migration generation
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/migration.rb11
1 files changed, 2 insertions, 9 deletions
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 <tt>db/migrate/</tt> directory where <tt>timestamp</tt> is the
# UTC formatted date and time that the migration was generated.
#
- # You may then edit the <tt>up</tt> and <tt>down</tt> 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 <tt>timestamp_add_fieldname_to_tablename</tt>, 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
#