From 14867b1a9af813b0147bba2ae06675137d61d77b Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Thu, 3 Mar 2016 10:32:42 +0530 Subject: [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. --- guides/source/getting_started.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'guides') 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 -- cgit v1.2.3