diff options
author | Arthur Nogueira Neves <github@arthurnn.com> | 2016-03-24 14:13:31 -0400 |
---|---|---|
committer | Arthur Nogueira Neves <github@arthurnn.com> | 2016-03-24 14:13:31 -0400 |
commit | 133befb59b8389cb483fd4194acdcddc5e288ab4 (patch) | |
tree | 61c9176469320b8a12f1d9fb60b45d265591dbf8 /activerecord/lib/active_record | |
parent | 5dc4bf82914811f37eefc9098d70b7aff7527c33 (diff) | |
parent | 16dadb1223fcabc9d904456d4b64d6e82f9e1a76 (diff) | |
download | rails-133befb59b8389cb483fd4194acdcddc5e288ab4.tar.gz rails-133befb59b8389cb483fd4194acdcddc5e288ab4.tar.bz2 rails-133befb59b8389cb483fd4194acdcddc5e288ab4.zip |
Merge pull request #24305 from chrisarcand/reload-ar-cache-after-migrations
Make 'migrate' clear the schema cache afterward
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/tasks/database_tasks.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb index 261a6a264f..8881986f1b 100644 --- a/activerecord/lib/active_record/tasks/database_tasks.rb +++ b/activerecord/lib/active_record/tasks/database_tasks.rb @@ -159,6 +159,7 @@ module ActiveRecord Migrator.migrate(migrations_paths, version) do |migration| scope.blank? || scope == migration.scope end + ActiveRecord::Base.clear_cache! ensure Migration.verbose = verbose_was end |