lib/field_test/experiment.rb in field_test-0.5.2 vs lib/field_test/experiment.rb in field_test-0.5.3

- old
+ new

@@ -111,13 +111,12 @@ column = if FieldTest.legacy_participants :participant elsif adapter_name =~ /postg/i # postgres "(participant_type, participant_id)" - elsif adapter_name =~ /mysql/i - "participant_type, participant_id" else - # not perfect, but it'll do + # SQLite supports single column + # MySQL supports multiple columns, but none can be NULL "COALESCE(participant_type, '') || ':' || participant_id" end converted = events.merge(relation).where(field_test_events: {name: goal}).distinct.count(column)