diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-08-15 00:29:59 +0300 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-08-15 00:40:43 +0300 |
commit | 50ac00cb73ff189794b5004085b76c81e131df6e (patch) | |
tree | b3f0749ed8a998284bbc4d2b22324d41c703c6ee /activerecord/lib/active_record/connection_adapters | |
parent | d54435b6bc3d6a2d679ca3cdd9a2a20ea2887893 (diff) | |
download | rails-50ac00cb73ff189794b5004085b76c81e131df6e.tar.gz rails-50ac00cb73ff189794b5004085b76c81e131df6e.tar.bz2 rails-50ac00cb73ff189794b5004085b76c81e131df6e.zip |
Follow up #33530
- Move changelog entry of #33530 up in order to preserve the chronology
since we always add new entries on the top of a changelog file.
- Clarify the changelog entry
- Clarify the docs of remove_foreign_key
- Ensure reversible of `remove_foreign_key` with `:primary_key` and `:to_table`
options.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index fd9bf48ab5..4702de1964 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -980,9 +980,9 @@ module ActiveRecord # # remove_foreign_key :accounts, column: :owner_id # - # Removes the foreign key on +accounts.owner_id+. in a reversible manner + # Removes the foreign key on +accounts.owner_id+. # - # remove_foreign_key :accounts, column: :owner_id, to_table: :owners + # remove_foreign_key :accounts, to_table: :owners # # Removes the foreign key named +special_fk_name+ on the +accounts+ table. # @@ -991,7 +991,7 @@ module ActiveRecord # The +options+ hash accepts the same keys as SchemaStatements#add_foreign_key # with an addition of # [<tt>:to_table</tt>] - # The table contains the referenced primary key. + # The name of the table that contains the referenced primary key. def remove_foreign_key(from_table, options_or_to_table = {}) return unless supports_foreign_keys? |