aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorartemk <kramarenko.artyom@gmail.com>2011-08-04 00:34:13 +0300
committerartemk <kramarenko.artyom@gmail.com>2011-08-04 00:34:13 +0300
commitb386951e4281f1a393a7448d5cccf84843ddac30 (patch)
treee3629b7fc90dc317a6c3a5a7658558a3819c0748
parent86b7d83f1ce81284cad37781667a5f204be22273 (diff)
downloadrails-b386951e4281f1a393a7448d5cccf84843ddac30.tar.gz
rails-b386951e4281f1a393a7448d5cccf84843ddac30.tar.bz2
rails-b386951e4281f1a393a7448d5cccf84843ddac30.zip
accept option for recreate db for postgres (same as mysql now)
-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>,