You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use native_json as default storage method for new installations (#67)
- Switch default storage method to native SQL JSON columns
- No longer recommend to set `ActiveSnapshot.config.storage_method`, its only retained to support legacy installations
- Drop support for Rails 6.0
*[#67](https://github.com/westonganger/active_snapshot/pull/67) - Switch default storage method to native SQL JSON columns. No longer recommend to set `ActiveSnapshot.config.storage_method`, its only retained to support legacy installations
7
+
* Drop support for Rails 6.0. Rails 6.1 is minimum required version now.
Copy file name to clipboardexpand all lines: README.md
-19
Original file line number
Diff line number
Diff line change
@@ -53,25 +53,6 @@ It defines an optional extension to your model: `has_snapshot_children`.
53
53
54
54
It defines one instance method to your model: `create_snapshot!`
55
55
56
-
# Using a different storage format
57
-
58
-
By default ActiveSnapshot encodes objects to JSON and stores in the database as plain text. If you prefer to have YAML encoded columns or native JSON DB columns you can configure this as follows:
59
-
60
-
```ruby
61
-
ActiveSnapshot.config do |config|
62
-
config.storage_method ="serialized_json"# default, for text column
63
-
#config.storage_method = "serialized_yaml" # for text column
64
-
#config.storage_method = "native_json" # for json/jsonb column
65
-
end
66
-
```
67
-
68
-
If using a native json column, you should configure the `storage_method` before generating the migration. If this step was missed then you would need to create a migration to change the `:object` and `:metadata` columns to json (or jsonb)
0 commit comments