1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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