From 95de0f01e06564bad3d598824a8cf63d3756dc98 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Fri, 12 Jun 2015 09:35:08 +0900 Subject: fix doc about foreign key name [ci skip] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this behavior was changed in b8e1f202676b4788c56241b124c401beff9f4014 --- guides/source/active_record_migrations.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3