You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When restarting transactions after hitting a deadlock, I'm getting this error message:
ActiveRecord::StatementInvalid: Mysql2::Error: Field 'item_type' doesn't have a default value: INSERT INTO `versions` (`item_id`) VALUES (2148253670)
The versions table is used by the PaperTrail Gem to store changes to records. Since versions are polymorphic, it needs to store item_type and item_id, like User and 1234.
My guess is that when this gem retries the transaction, it loses this somewhere along the way.
Note, this is the only time I've encountered this error and it only occurs with the transaction_retry gem and after hitting a deadlock.
I might be able to investigate further but a little help in the right direction would be good.
Thanks!
Josh
The text was updated successfully, but these errors were encountered:
When restarting transactions after hitting a deadlock, I'm getting this error message:
The
versions
table is used by thePaperTrail
Gem to store changes to records. Since versions are polymorphic, it needs to storeitem_type
anditem_id
, likeUser
and1234
.My guess is that when this gem retries the transaction, it loses this somewhere along the way.
Note, this is the only time I've encountered this error and it only occurs with the
transaction_retry
gem and after hitting a deadlock.I might be able to investigate further but a little help in the right direction would be good.
Thanks!
Josh
The text was updated successfully, but these errors were encountered: