diff options
author | Josh Justice <jjustice@bignerdranch.com> | 2016-07-16 05:21:51 -0400 |
---|---|---|
committer | Josh Justice <jjustice@bignerdranch.com> | 2016-07-16 05:23:17 -0400 |
commit | 65132b9087937945dde4993112f2f640db3b013b (patch) | |
tree | 124eddd50c2f3d45e4a16a4a926714c9291156e8 /guides | |
parent | 4d74d4f3548c8309ec56561282f4adb69c30ee70 (diff) | |
download | rails-65132b9087937945dde4993112f2f640db3b013b.tar.gz rails-65132b9087937945dde4993112f2f640db3b013b.tar.bz2 rails-65132b9087937945dde4993112f2f640db3b013b.zip |
Update references generation docs to exclude index
In #23179 the migration generator was changed to no longer output `index: true` for `references` migrations. This updates the migrations guide to remove `index: true` from relevant examples.
[ci skip]
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/active_record_migrations.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/active_record_migrations.md b/guides/source/active_record_migrations.md index f914122242..a45becf670 100644 --- a/guides/source/active_record_migrations.md +++ b/guides/source/active_record_migrations.md @@ -241,7 +241,7 @@ generates ```ruby class AddUserRefToProducts < ActiveRecord::Migration[5.0] def change - add_reference :products, :user, index: true, foreign_key: true + add_reference :products, :user, foreign_key: true end end ``` @@ -313,7 +313,7 @@ will produce a migration that looks like this class AddDetailsToProducts < ActiveRecord::Migration[5.0] def change add_column :products, :price, :decimal, precision: 5, scale: 2 - add_reference :products, :supplier, polymorphic: true, index: true + add_reference :products, :supplier, polymorphic: true end end ``` |