1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/support
Jean Boussier 617f9908e3 Add Active Record Marshal forward compatibility tests
This is following a recent discussion on Basecamp.

So far Rails haven't tried to preserve Marshal compatibilty of Active Record instances,
and it probably shouldn't as it isn't as controllable as other serialization formats.

However it's common to store ActiveRecord instances in Rails.cache, and when the
Marshal format changes, it causes problems during Rails upgrade. Process using the new Rails
version might not be able to deserialize the existing cache, and also older process that
weren't restarted yet my fail to load the cache entries written by newer processes.

The goal of this PR is not to freeze the Marshal format, but to have a better visibility
when it changes, so that's it's done on purpose with good reasons rather than accidentally.

Note that this only test forward compatibility (AR vN reading entries written by AR vN-1),
ideally we'd also test backward compatibility (AR vN-1 reading entries written by AR vN),
but it means installing and loading and older Active Record as part of the test suite.
2020-07-02 14:11:51 +02:00
..
marshal_compatibility_fixtures Add Active Record Marshal forward compatibility tests 2020-07-02 14:11:51 +02:00
stubs Change safe guard to check for each_pair instead of stringify_keys 2020-02-07 11:36:35 -05:00
yaml_compatibility_fixtures Fix yaml_compatibility_fixtures/rails_v1_mysql.yml's structure 2020-06-30 23:32:05 +09:00
config.rb Extract internal ActiveSupport::ConfigurationFile object 2020-02-10 02:50:12 +01:00
connection.rb Rename a test method to not conflict with a deprecated method 2019-12-17 12:35:15 -05:00
connection_helper.rb Deprecate #remove_connection in favor of #remove_connection_pool 2020-01-21 16:49:20 -05:00
ddl_helper.rb
schema_dumping_helper.rb