diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-12-31 09:17:58 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-12-31 09:17:58 +0100 |
commit | 8b2a5990a58a5be770643d3e0fc6f337989088fd (patch) | |
tree | 5b18694c7d9df9d46adac7edef135d78c293b93c /guides | |
parent | ca605fa47ac9ca00452c4e31ec3657cb1edec8d0 (diff) | |
parent | 0591e852d281f3d950dc27ba96cfd1e1a047be76 (diff) | |
download | rails-8b2a5990a58a5be770643d3e0fc6f337989088fd.tar.gz rails-8b2a5990a58a5be770643d3e0fc6f337989088fd.tar.bz2 rails-8b2a5990a58a5be770643d3e0fc6f337989088fd.zip |
Merge pull request #18269 from cuppincake/getting-started-migration-update
Update Getting Started guide to reflect foreign key in migration [ci skip]
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/getting_started.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index ff6e0db480..bb80063f2b 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -1544,6 +1544,7 @@ class CreateComments < ActiveRecord::Migration t.timestamps null: false end + add_foreign_key :comments, :articles end end ``` @@ -1563,6 +1564,8 @@ 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) ======================================== ``` |