Merge pull request #2413 from artemk/master

accept hash of options to recreate database for postgres adapter
This commit is contained in:
Santiago Pastorino
2011-08-03 15:34:11 -07:00

View File

@@ -614,9 +614,11 @@ module ActiveRecord
# SCHEMA STATEMENTS ========================================
def recreate_database(name) #:nodoc:
# Drops the database specified on the +name+ attribute
# and creates it again using the provided +options+.
def recreate_database(name, options = {}) #:nodoc:
drop_database(name)
create_database(name)
create_database(name, options)
end
# Create a new PostgreSQL database. Options include <tt>:owner</tt>, <tt>:template</tt>,