gocardless / statesman

A statesmanlike state machine library.
https://gocardless.com/blog/statesman/
MIT License
1.78k stars 163 forks source link

Mysql2::Error: Unknown column 'transitions.updated_at' in 'field list' #305

Closed diei closed 6 years ago

diei commented 6 years ago

I think issue #285 caused my problem, if I update vom 3.2.0 to 3.3.0.

With gem version 3.3.0 I get following error:

ActiveRecord::StatementInvalid: Mysql2::Error: Unknown column 'transitions.updated_at' in 'field list': UPDATE transitions SET transitions.most_recent = NULL, transitions.updated_at = '2014-02-28 00:00:00.187677' WHERE transitions.order_id = 33414634 AND order_transitions.most_recent = 1

The issue is, that my table "transitions" has wilfully no attribute "updated_at", but the gem does not care about that! Please fix this.

timrogers commented 6 years ago

Makes sense - the changes introduced in #285 assume that you have that column available. I'll look at introducing a fix to this.