My ActiveRecord model PaperTrail::Version has a field named whodunnit of type text.
I want to make a where.not query on this field:
PaperTrail::Version.where.not(:whodunnit => 4)
That works fine on SQLite but if fails on PostgreSQL:
2014-12-04T07:21:42.484139+00:00 app[web.1]: ActionView::Template::Error (PG::UndefinedFunction: ERROR: operator does not exist: character varying <> integer
2014-12-04T07:21:42.484142+00:00 app[web.1]: LINE 1: ....("versions"."whodunnit" != 4) ORD...
How should I change my query to make it work on both databases?