aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/migration.rb
diff options
context:
space:
mode:
authorAditya Kapoor <aditya.kapoor@vinsol.com>2014-08-21 00:53:26 +0530
committerAditya Kapoor <aditya.kapoor@vinsol.com>2014-08-21 00:53:26 +0530
commit2858e31387616f2a3a3b149571a3e09f2dabb7b8 (patch)
tree9b37450f851b053e3fcc0151544a45caa1168831 /activerecord/lib/active_record/migration.rb
parent2f194669ec8ac6445dcb4645077f07d292fd35c1 (diff)
downloadrails-2858e31387616f2a3a3b149571a3e09f2dabb7b8.tar.gz
rails-2858e31387616f2a3a3b149571a3e09f2dabb7b8.tar.bz2
rails-2858e31387616f2a3a3b149571a3e09f2dabb7b8.zip
[ci skip] correct docs about the migration generation
Diffstat (limited to 'activerecord/lib/active_record/migration.rb')
-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
#