diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-04-30 11:20:32 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-04-30 11:21:15 -0700 |
commit | 2088bf27981137a2c6c8b2f718f33b417b4045af (patch) | |
tree | a7edded55de00ac106f273a5fc09d7e1d60a6f56 /activerecord/lib/active_record/connection_adapters | |
parent | 3910817bfeae47bdaa4453f6639230eb4d45aaeb (diff) | |
download | rails-2088bf27981137a2c6c8b2f718f33b417b4045af.tar.gz rails-2088bf27981137a2c6c8b2f718f33b417b4045af.tar.bz2 rails-2088bf27981137a2c6c8b2f718f33b417b4045af.zip |
mysql needs to reconnect after recreate. Thanks @mperham
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb index 76c501dec5..2a7b855f95 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb @@ -365,6 +365,7 @@ module ActiveRecord def recreate_database(name, options = {}) drop_database(name) create_database(name, options) + reconnect! end # Create a new MySQL database with optional <tt>:charset</tt> and <tt>:collation</tt>. |