aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/upgrading_ruby_on_rails.md
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2015-01-06 10:50:51 -0200
committerAndrey Nering <andrey.nering@gmail.com>2015-02-10 20:45:17 -0200
commite1db9d6418ea963e37bac798130082388517089b (patch)
treef85981e1d1ef2a1e871907b9ee5fa2b5768c9b0e /guides/source/upgrading_ruby_on_rails.md
parent20649697ce6b03d06892f8ae7dda96781fb56d2c (diff)
downloadrails-e1db9d6418ea963e37bac798130082388517089b.tar.gz
rails-e1db9d6418ea963e37bac798130082388517089b.tar.bz2
rails-e1db9d6418ea963e37bac798130082388517089b.zip
Adding subsection on 'upgrading' guide about 4.2 foreign key support [ci skip]
Diffstat (limited to 'guides/source/upgrading_ruby_on_rails.md')
-rw-r--r--guides/source/upgrading_ruby_on_rails.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md
index 909a92b9dd..05bef61242 100644
--- a/guides/source/upgrading_ruby_on_rails.md
+++ b/guides/source/upgrading_ruby_on_rails.md
@@ -276,6 +276,20 @@ 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.
+
+If you are from Foreigner to Rails foreign keys, you can follow these steps:
+
+1. remove "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
-------------------------------------