diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-06-12 09:35:08 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-06-12 09:39:18 +0900 |
commit | 95de0f01e06564bad3d598824a8cf63d3756dc98 (patch) | |
tree | c39dd43ff6b6ed9f3ec4f5fc698a1888ea964579 | |
parent | 21f7bcbaa7709ed072bb2e1273d25c09eeaa26d9 (diff) | |
download | rails-95de0f01e06564bad3d598824a8cf63d3756dc98.tar.gz rails-95de0f01e06564bad3d598824a8cf63d3756dc98.tar.bz2 rails-95de0f01e06564bad3d598824a8cf63d3756dc98.zip |
fix doc about foreign key name [ci skip]
this behavior was changed in b8e1f202676b4788c56241b124c401beff9f4014
-rw-r--r-- | guides/source/active_record_migrations.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/guides/source/active_record_migrations.md b/guides/source/active_record_migrations.md index 80b1bde1c7..ad069a112e 100644 --- a/guides/source/active_record_migrations.md +++ b/guides/source/active_record_migrations.md @@ -475,7 +475,8 @@ column names can not be derived from the table names, you can use the `:column` and `:primary_key` options. Rails will generate a name for every foreign key starting with -`fk_rails_` followed by 10 random characters. +`fk_rails_` followed by 10 character which is deterministically +generated from the `from_table` and `column`. There is a `:name` option to specify a different name if needed. NOTE: Active Record only supports single column foreign keys. `execute` and |