diff options
author | Mauro George <maurogot@gmail.com> | 2015-06-13 16:48:06 -0300 |
---|---|---|
committer | Mauro George <maurogot@gmail.com> | 2015-06-13 16:48:06 -0300 |
commit | 0f194a0b166c3dea55a078fae0050e6a36ffc001 (patch) | |
tree | ccaff0eb2da27c24bcf7c39eb5bdcf67d77d4d90 | |
parent | dfc9269517d787d187ee46c798a4ea0893de0381 (diff) | |
download | rails-0f194a0b166c3dea55a078fae0050e6a36ffc001.tar.gz rails-0f194a0b166c3dea55a078fae0050e6a36ffc001.tar.bz2 rails-0f194a0b166c3dea55a078fae0050e6a36ffc001.zip |
Add RDoc about add_reference to ActiveRecord::Migration
[ci skip]
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index 192a456846..8e7f986a0c 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -142,6 +142,12 @@ module ActiveRecord # specified by +column_name+. # * <tt>remove_index(table_name, name: index_name)</tt>: Removes the index # specified by +index_name+. + # * <tt>add_reference(:table_name, :reference_name)</tt>: Adds a new column + # +reference_name_id+ by default a integer. Other options include + # <tt>:type</tt> (e.g. <tt>type: :string</tt>), <tt>:polymorphic</tt> + # (e.g. <tt>polymorphic: true</tt>) and <tt>:index</tt> + # (e.g. <tt>polymorphic: true, index: true</tt>). + # Also aliased as: <tt>add_belongs_to</tt>. # # == Irreversible transformations # |