diff options
author | Gaurish Sharma <contact@gaurishsharma.com> | 2012-12-14 10:43:13 +0530 |
---|---|---|
committer | Gaurish Sharma <contact@gaurishsharma.com> | 2012-12-14 10:43:13 +0530 |
commit | fcdc0d8335f0a5ad01231110677cb0bd9410b678 (patch) | |
tree | 43ca26aad3c0645e4f57548c67d04c4f59f6e2a7 | |
parent | 948c1e506c63fc1e74fd24d8ca73cfc6de0e725f (diff) | |
download | rails-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/USAGE | 9 |
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 |