sequelize-paper-trail icon indicating copy to clipboard operation
sequelize-paper-trail copied to clipboard

JSON field does not work anymore in MySQL 5.7+

Open ksfreitas opened this issue 5 years ago • 4 comments

JSON field was changed to JSONB (I think its a Postgres specific field). In past versions of paper-trail, the JSON field it worked fine with MySQL 5.7+ versions.

I'm working in a patch to keep paper trail working both with Pg/MySQL native JSON fields.

ksfreitas avatar Nov 21 '19 01:11 ksfreitas

Hi, I'm using mysql 5.6 and it is not recognizing json fields - is mysql 5.7+ a dependency of this package?

EdByrnee avatar Nov 26 '19 15:11 EdByrnee

Hi, I'm using mysql 5.6 and it is not recognizing json fields - is mysql 5.7+ a dependency of this package?

No, you can configure using the option documentFieldType as legacy. Look my fork: https://github.com/ksfreitas/sequelize-paper-trail

ksfreitas avatar Nov 26 '19 17:11 ksfreitas

Hi, I'm using mysql 5.6 and it is not recognizing json fields - is mysql 5.7+ a dependency of this package?

Currently you can work with any MySQL using the undocumented param mysql as true.

ksfreitas avatar Nov 26 '19 17:11 ksfreitas

would be nice to document the mysql parameter.

garma83 avatar Jul 10 '21 15:07 garma83