aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaurish Sharma <contact@gaurishsharma.com>2012-12-14 10:43:13 +0530
committerGaurish Sharma <contact@gaurishsharma.com>2012-12-14 10:43:13 +0530
commitfcdc0d8335f0a5ad01231110677cb0bd9410b678 (patch)
tree43ca26aad3c0645e4f57548c67d04c4f59f6e2a7
parent948c1e506c63fc1e74fd24d8ca73cfc6de0e725f (diff)
downloadrails-fcdc0d8335f0a5ad01231110677cb0bd9410b678.tar.gz
rails-fcdc0d8335f0a5ad01231110677cb0bd9410b678.tar.bz2
rails-fcdc0d8335f0a5ad01231110677cb0bd9410b678.zip
Change method is default since rails 3.1 [ci skip]
Since Rails 3.1, change method is preferred for writing migrations. Updated the example, because that command would generate migration with change method.
-rw-r--r--railties/lib/rails/generators/rails/migration/USAGE9
1 files changed, 1 insertions, 8 deletions
diff --git a/railties/lib/rails/generators/rails/migration/USAGE b/railties/lib/rails/generators/rails/migration/USAGE
index af74963b01..da7012eb3b 100644
--- a/railties/lib/rails/generators/rails/migration/USAGE
+++ b/railties/lib/rails/generators/rails/migration/USAGE
@@ -15,15 +15,8 @@ Example:
`rails generate migration AddTitleBodyToPost title:string body:text published:boolean`
- This will create the AddTitleBodyToPost in db/migrate/20080514090912_add_title_body_to_post.rb with
- this in the Up migration:
+ This will create the AddTitleBodyToPost in db/migrate/20080514090912_add_title_body_to_post.rb with following change migration:
add_column :posts, :title, :string
add_column :posts, :body, :text
add_column :posts, :published, :boolean
-
- And this in the Down migration:
-
- remove_column :posts, :published
- remove_column :posts, :body
- remove_column :posts, :title