aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-08-03 15:34:11 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2011-08-03 15:34:11 -0700
commitcc9ed157853bf9c7932efbe8a06f4e39a0ad1c08 (patch)
tree161cbb3784f3582815e57aa01a8da109a0d3874c
parentbf5d1d46623d478bb4371a60bead97022cef11ed (diff)
parentb386951e4281f1a393a7448d5cccf84843ddac30 (diff)
downloadrails-cc9ed157853bf9c7932efbe8a06f4e39a0ad1c08.tar.gz
rails-cc9ed157853bf9c7932efbe8a06f4e39a0ad1c08.tar.bz2
rails-cc9ed157853bf9c7932efbe8a06f4e39a0ad1c08.zip
Merge pull request #2413 from artemk/master
accept hash of options to recreate database for postgres adapter
-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>,