Method: ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter#recreate_database
- Defined in:
- activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
#recreate_database(name, options = {}) ⇒ Object
Drops the database specified on the name attribute and creates it again using the provided options.
262 263 264 265 266 267 |
# File 'activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb', line 262 def recreate_database(name, = {}) drop_database(name) sql = create_database(name, ) reconnect! sql end |