diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index e3be1eb894..089f93db45 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,7 @@ +* `db:purge` with MySQL respects `Rails.env`. + + *Yves Senn* + * `change_column_default :table, :column, nil` with PostgreSQL will issue a `DROP DEFAULT` instead of a `DEFAULT NULL` query. diff --git a/activerecord/lib/active_record/tasks/mysql_database_tasks.rb b/activerecord/lib/active_record/tasks/mysql_database_tasks.rb index 644c4852b9..d890196f47 100644 --- a/activerecord/lib/active_record/tasks/mysql_database_tasks.rb +++ b/activerecord/lib/active_record/tasks/mysql_database_tasks.rb @@ -42,7 +42,7 @@ module ActiveRecord end def purge - establish_connection :test + establish_connection configuration connection.recreate_database configuration['database'], creation_options end