Skip to content

Commit

Permalink
Support the :column option for remove_index with the PostgreSQL adapt…
Browse files Browse the repository at this point in the history
…er. Closes #3661.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3499 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
Marcel Molina committed Jan 31, 2006
1 parent d2adec4 commit 2bf3fa0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 2 additions & 0 deletions activerecord/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*

* Support the :column option for remove_index with the PostgreSQL adapter. #3661 [shugo@ruby-lang.org]

* Add documentation for add_index and remove_index. #3600 [Manfred Stienstra <m.stienstra@fngtps.com>]

* If the OCI library is not available, raise an exception indicating as much. #3593 [schoenm@earthlink.net]
Expand Down
Expand Up @@ -325,13 +325,7 @@ def rename_column(table_name, column_name, new_column_name) #:nodoc:
end

def remove_index(table_name, options) #:nodoc:
if Hash === options
index_name = options[:name]
else
index_name = "#{table_name}_#{options}_index"
end

execute "DROP INDEX #{index_name}"
execute "DROP INDEX #{index_name(table_name, options)}"
end


Expand Down

0 comments on commit 2bf3fa0

Please sign in to comment.