aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorartemk <kramarenko.artyom@gmail.com>2011-08-04 00:34:13 +0300
committerXavier Noria <fxn@hashref.com>2011-08-13 16:22:28 -0700
commitbb72183bca60c105c901f6c38cf81dae3a104102 (patch)
tree716bc54e344ac184444ecd367c0c34734b563f91 /activerecord
parentab6b61e34c046da944d9b517876a032fe3d0a8a1 (diff)
downloadrails-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.rb6
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>,