Closed westonganger closed 1 year ago
One reason to switch to JSON columns would be that we could remove the user_id and user_type columns from snapshots
table as all info could be stored in metadata
column. For custom solutions even the identifier
column could be removed and stored in metadata
column too.
See issue on pay gem where they discuss JSON problems with MySQL/MariaDB
https://github.com/pay-rails/pay/issues/425
Maybe the solution there can be used to mitigate whatever issues were occuring
This is now supported see the readme, https://github.com/westonganger/active_snapshot#using-a-different-storage-format
If you want to use a JSON column instead of YAML encoded solution.
active_record-import and MySQL were not playing nice with JSON columns so I switch to a YAML encoded solution. It should be relatively straight forward to switch to json instead of the text column.The following patch should work for this case.