提交 27026804 编写于 作者: Z Zachary Scott

Merge pull request #20630 from y-yagi/fix_references_migration_example

correct example output of references migration [ci skip]
......@@ -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)
== CreateComments: migrated (0.0119s) ========================================
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册