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

Type JSON not working for MariaDB #675

Open chmich opened 1 year ago

chmich commented 1 year ago

Hi

MariaDB 10.11.3, audited 5.3.3

I had the error Psych::DisallowedClass: Tried to load unspecified class: ActiveSupport::BigDecimal.

Regarding to issue 67912150 Psych::DisallowedClass i switched to to json.

But didnt change anything.

Problem:

MariaDB marks column type :json as :longtext, see Stackoverflow

Unlike mySql, MariaDB marks json types as longtext, see mariadb json or Stackoverflow.

Could it be that for this reason audited is not able to recognize json as a data type?

Would it be an idea to have a config to override the detection based on column type and tell audited to handle audits as json?

Thanks, Chris