collectiveidea / audited

Audited (formerly acts_as_audited) is an ORM extension that logs all changes to your Rails models.
MIT License
3.34k stars 645 forks source link

Data too long for column 'audited_changes' #674

Open akostadinov opened 1 year ago

akostadinov commented 1 year ago

Hello, trying to audit very long columns results in

ActiveRecord::ValueTooLong: Mysql2::Error: Data too long for column 'audited_changes' at row 1

I understand that one option is to increase audited column size. But it is unpractical for us, also there can always be other audited columns with a potentially very long text that exceeds audited column size. Because during audit old and new values are both stored in the audited column.

So is it somehow possible to specify truncation limits or maybe add ability to add a proc pre-processor that could include custom logic depending on the project and the use case?