Permalink
Browse files

Post the postgresql adapter (and hopefully other adapters) pass all t…

…ests

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2316 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 6d4a4a0 commit 9838a5f8b3f75f93d9d605cbf5f81e182c4bdb52 @jamis jamis committed Sep 23, 2005
@@ -276,10 +276,10 @@ def select_all(sql, name = nil) end
def select_one(sql, name = nil) end
# Returns an array of table names for the current database.
- def tables(name = nil) end
+ # def tables(name = nil) end
# Returns an array of indexes for the given table.
- def indexes(table_name, name = nil) end
+ # def indexes(table_name, name = nil) end
# Returns an array of column objects for the table specified by +table_name+.
def columns(table_name, name = nil) end
@@ -163,8 +163,14 @@ def rename_column(table_name, column_name, new_column_name)
execute "ALTER TABLE #{table_name} RENAME COLUMN #{column_name} TO #{new_column_name}"
end
- def remove_index(table_name, column_name)
- execute "DROP INDEX #{table_name}_#{column_name}_index"
+ def remove_index(table_name, options)
+ if Hash === options
+ index_name = options[:name]
+ else
+ index_name = "#{table_name}_#{options}_index"
+ end
+
+ execute "DROP INDEX #{index_name}"
end
private

0 comments on commit 9838a5f

Please sign in to comment.