diff options
author | artemk <kramarenko.artyom@gmail.com> | 2011-08-04 00:34:13 +0300 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-08-13 16:22:28 -0700 |
commit | bb72183bca60c105c901f6c38cf81dae3a104102 (patch) | |
tree | 716bc54e344ac184444ecd367c0c34734b563f91 /activerecord | |
parent | ab6b61e34c046da944d9b517876a032fe3d0a8a1 (diff) | |
download | rails-bb72183bca60c105c901f6c38cf81dae3a104102.tar.gz rails-bb72183bca60c105c901f6c38cf81dae3a104102.tar.bz2 rails-bb72183bca60c105c901f6c38cf81dae3a104102.zip |
accept option for recreate db for postgres (same as mysql now)
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index a84f73c73f..aefe69f8ed 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -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>, |