diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-05-04 08:55:10 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-05-04 08:55:10 -0700 |
commit | fcc46833a88cb287e92dbfec76091a0fa29d3948 (patch) | |
tree | 432448cc2c29fbb7ac9cdda5d8bf6ed188a69d1f /activerecord/lib/active_record/railtie.rb | |
parent | 9619331001828a9877b7a1e1a451f7ab98ca0285 (diff) | |
parent | 33fe7cc8892e7e2cf82f7cb0baf467590eb61988 (diff) | |
download | rails-fcc46833a88cb287e92dbfec76091a0fa29d3948.tar.gz rails-fcc46833a88cb287e92dbfec76091a0fa29d3948.tar.bz2 rails-fcc46833a88cb287e92dbfec76091a0fa29d3948.zip |
Merge pull request #17632 from eugeneius/schema_cache_dump_connection_pool
Apply schema cache dump when creating connections
Diffstat (limited to 'activerecord/lib/active_record/railtie.rb')
-rw-r--r-- | activerecord/lib/active_record/railtie.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index 7e907beec0..5af64b717a 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -93,6 +93,7 @@ module ActiveRecord cache = Marshal.load File.binread filename if cache.version == ActiveRecord::Migrator.current_version self.connection.schema_cache = cache + self.connection_pool.schema_cache = cache.dup else warn "Ignoring db/schema_cache.dump because it has expired. The current schema version is #{ActiveRecord::Migrator.current_version}, but the one in the cache is #{cache.version}." end |