instance method
recreate_database
Ruby on Rails 4.2.9
Since v3.2.22.5Signature
recreate_database(name, options = {})
Drops the database specified on the name attribute and creates it again using the provided options.
Parameters
-
namereq -
optionsopt = {}
Source
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 361
def recreate_database(name, options = {})
drop_database(name)
sql = create_database(name, options)
reconnect!
sql
end
Defined in activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb line 361
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter