aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/migration.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/migration.rb')
-rw-r--r--activerecord/lib/active_record/migration.rb6
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
#