Open createthis opened 5 years ago
This appears to be related to https://github.com/sequelize/sequelize/issues/10717
If the revisionModel is Revisions, sequelize 5 has a bug and lowercases the table name as revisions in queries. This breaks sequelize-paper-trail.
revisionModel
Revisions
revisions
sequelize-paper-trail
I've found two potential solutions both added on https://github.com/nielsgl/sequelize-paper-trail/blob/a0f0b6aa4fdfdf1cd6d93f43ca49850dec566a44/lib/index.js#L637
freezeTableName: true,
tableName: options.tableName,
@nielsgl ^
This appears to be related to https://github.com/sequelize/sequelize/issues/10717
If the
revisionModel
isRevisions
, sequelize 5 has a bug and lowercases the table name asrevisions
in queries. This breakssequelize-paper-trail
.I've found two potential solutions both added on https://github.com/nielsgl/sequelize-paper-trail/blob/a0f0b6aa4fdfdf1cd6d93f43ca49850dec566a44/lib/index.js#L637
freezeTableName: true,
tableName: options.tableName,