accept option for recreate db for postgres (same as mysql now)

This commit is contained in:
artemk
2011-08-04 00:34:13 +03:00
committed by Xavier Noria
parent ab6b61e34c
commit bb72183bca

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>,