Skip to content
Browse files

accept option for recreate db for postgres (same as mysql now)

  • Loading branch information...
1 parent ab6b61e commit bb72183bca60c105c901f6c38cf81dae3a104102 @artemk artemk committed with fxn Aug 4, 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 bb72183

Please sign in to comment.
Something went wrong with that request. Please try again.