diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-06-19 08:11:25 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-06-19 08:16:36 +0900 |
commit | 79da9804482ab8357c24c7d62a9faa403acee655 (patch) | |
tree | e4cfaef843a2c0fcf73d97567debe8a1e310f26a /guides | |
parent | 4d8abebf4eed8f4e31dc90818907e792b2c39a24 (diff) | |
download | rails-79da9804482ab8357c24c7d62a9faa403acee655.tar.gz rails-79da9804482ab8357c24c7d62a9faa403acee655.tar.bz2 rails-79da9804482ab8357c24c7d62a9faa403acee655.zip |
correct example output of references migration [ci skip]
this behavior was changed in 99a6f9e60ea55924b44f894a16f8de0162cf2702
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/getting_started.md | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index e64a788ac2..79d4393f32 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -1547,11 +1547,10 @@ class CreateComments < ActiveRecord::Migration t.text :body # this line adds an integer column called `article_id`. - t.references :article, index: true + t.references :article, index: true, foreign_key: true t.timestamps null: false end - add_foreign_key :comments, :articles end end ``` @@ -1571,8 +1570,6 @@ run against the current database, so in this case you will just see: == CreateComments: migrating ================================================= -- create_table(:comments) -> 0.0115s --- add_foreign_key(:comments, :articles) - -> 0.0000s == CreateComments: migrated (0.0119s) ======================================== ``` |