Field 'model' doesn't have a default value in version 2.1.0
ksfreitas opened this issue · 3 comments
ksfreitas commented
After update to version 2.1.0, cannot register any revision:
sqlMessage: 'Field \'model\' doesn\'t have a default value',
sql: 'INSERT INTO `revisions` (`id`,`createdAt`,`updatedAt`,`revision`) VALUES (DEFAULT,\'2019-01-03 03:58:29\',\'2019-01-03 03:58:29\',1);' },
Observe that some fields are not in SQL, like model
, documentId
, document
and userId
.
I located the problem in line 321 in opt
param passed in save
call.
If the opt is removed like in the old version, the function back work (I don't know why yet).
Origin commit e015126
ksfreitas commented
If only transaction is passed in a new opt object, works... The cause is unknown, but this keep paper-trail transactional and fix my problem...
Any ideas?
ksfreitas commented
nielsgl commented
Ah 🤦♂️ I tested it with a quite old version of sequelize in which it did work, thanks a lot for investigating and resolving it @ksfreitas 🍺