aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/migration.rb
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2007-10-26 03:55:22 +0000
committerMarcel Molina <marcel@vernix.org>2007-10-26 03:55:22 +0000
commit27941f649ffdae507e099720dbb972cfb07b16b8 (patch)
treee900964a8a860a07a13aa2c2669461c9ffa4188f /activerecord/lib/active_record/migration.rb
parentbf658a906bf32127429f3ba808cef65c49b59607 (diff)
downloadrails-27941f649ffdae507e099720dbb972cfb07b16b8.tar.gz
rails-27941f649ffdae507e099720dbb972cfb07b16b8.tar.bz2
rails-27941f649ffdae507e099720dbb972cfb07b16b8.zip
Update add_index documentation to use new options api. Closes #9787 [kamal]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8031 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/migration.rb')
-rw-r--r--activerecord/lib/active_record/migration.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb
index 692859e2a6..2405eeb873 100644
--- a/activerecord/lib/active_record/migration.rb
+++ b/activerecord/lib/active_record/migration.rb
@@ -78,7 +78,8 @@ module ActiveRecord
# * <tt>change_column(table_name, column_name, type, options)</tt>: Changes the column to a different type using the same
# parameters as add_column.
# * <tt>remove_column(table_name, column_name)</tt>: Removes the column named +column_name+ from the table called +table_name+.
- # * <tt>add_index(table_name, column_names, index_type, index_name)</tt>: Add a new index with the name of the column, or +index_name+ (if specified) on the column(s). Specify an optional +index_type+ (e.g. UNIQUE).
+ # * <tt>add_index(table_name, column_names, options)</tt>: Add a new index with the name of the column. Other options include
+ # :name and :unique (e.g. { :name => "users_name_index", :unique => true }).
# * <tt>remove_index(table_name, index_name)</tt>: Remove the index specified by +index_name+.
#
# == Irreversible transformations