Permalink
Browse files

Merge pull request #2413 from artemk/master

accept hash of options to recreate database for postgres adapter
  • Loading branch information...
2 parents bf5d1d4 + b386951 commit cc9ed157853bf9c7932efbe8a06f4e39a0ad1c08 @spastorino spastorino committed Aug 3, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
View
6 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -614,9 +614,11 @@ def release_savepoint
# 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>,

0 comments on commit cc9ed15

Please sign in to comment.