aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-02-11 08:37:25 +0100
committerYves Senn <yves.senn@gmail.com>2015-02-11 08:41:06 +0100
commit4a9301b3f2ac0f7bc1ae41b4545d1e1600ae4f4f (patch)
tree86e1d62f7c70b6a4fbdf01108610e78fc9576797 /guides
parent4901d033486560333c700934ad1caffe40ef6e12 (diff)
parente1db9d6418ea963e37bac798130082388517089b (diff)
downloadrails-4a9301b3f2ac0f7bc1ae41b4545d1e1600ae4f4f.tar.gz
rails-4a9301b3f2ac0f7bc1ae41b4545d1e1600ae4f4f.tar.bz2
rails-4a9301b3f2ac0f7bc1ae41b4545d1e1600ae4f4f.zip
Merge pull request #18363 from andreynering/add-foreign-key-subsection-in-upgrading-guide
Adding subsection on 'Upgrading' guide about foreign key support [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/upgrading_ruby_on_rails.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md
index 909a92b9dd..20b90bdba0 100644
--- a/guides/source/upgrading_ruby_on_rails.md
+++ b/guides/source/upgrading_ruby_on_rails.md
@@ -276,6 +276,22 @@ class Notifier < ActionMailer::Base
end
```
+### Foreign Key Support
+
+The migration DSL has been expanded to support foreign key definitions. If
+you've been using the Foreigner gem, you might want to consider removing it.
+Note that the foreign key support of Rails is a subset of Foreigner. This means
+that not every Foreigner definition can be fully replaced by it's Rails
+migration DSL counterpart.
+
+The migration procedure is as follows:
+
+1. remove `gem "foreigner"` from the Gemfile.
+2. run `bundle install`.
+3. run `bin/rake db:schema:dump`.
+4. make sure that `db/schema.rb` contains every foreign key definition with
+the necessary options.
+
Upgrading from Rails 4.0 to Rails 4.1
-------------------------------------