diff options
author | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-03-03 10:32:42 +0530 |
---|---|---|
committer | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-03-03 10:32:42 +0530 |
commit | 14867b1a9af813b0147bba2ae06675137d61d77b (patch) | |
tree | 7a63a5844a58ae6940fcf9d9d96365d689f68a68 | |
parent | d3b1eccff996811e05c28c0f288662caad864bb5 (diff) | |
download | rails-14867b1a9af813b0147bba2ae06675137d61d77b.tar.gz rails-14867b1a9af813b0147bba2ae06675137d61d77b.tar.bz2 rails-14867b1a9af813b0147bba2ae06675137d61d77b.zip |
[ci skip] Update getting started guide for chanages in migrations API
- We no longer add `null: false` for timestamps columns as per
https://github.com/rails/rails/commit/a939506f297b667291480f26fa32a373a18ae06a.
- Similarly `references` and `belongs_to` columns no longer mention
`index: true` in migration files. It's added by default as per
https://github.com/rails/rails/commit/909818b93b8f1bd4d7053a1c5d8135b9b0cbe865.
-rw-r--r-- | guides/source/getting_started.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index 2cbc591629..3152d375c4 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -686,7 +686,7 @@ class CreateArticles < ActiveRecord::Migration[5.0] t.string :title t.text :text - t.timestamps null: false + t.timestamps end end end @@ -1554,9 +1554,9 @@ class CreateComments < ActiveRecord::Migration[5.0] create_table :comments do |t| t.string :commenter t.text :body - t.references :article, index: true, foreign_key: true + t.references :article, foreign_key: true - t.timestamps null: false + t.timestamps end end end |