nielsgl / sequelize-paper-trail

Sequelize plugin for tracking revision history of model instances.
MIT License
95 stars 69 forks source link

JSON field does not work anymore in MySQL 5.7+ #91

Open ksfreitas opened 5 years ago

ksfreitas commented 5 years ago

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.

EdByrnee commented 5 years ago

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

ksfreitas commented 5 years ago

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 commented 5 years ago

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.

garma83 commented 3 years ago

would be nice to document the mysql parameter.