The Question.duplicate_question method works fine with SQLite, but it does not work with PostgreSQL
(which is used in production):
join questions as q2 on q.text = q2.text and q.text is not null and
q2.text is not null and q.id < q2.id group by q2.id order by q.id
ActiveRecord::StatementInvalid: PG::GroupingError: ERROR: column "q.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 3: ...xt is not null and q.id < q2.id group by q2.id order by q.id
The same holds for Question.duplicate_question_and_answers.
The Question.duplicate_question method works fine with SQLite, but it does not work with PostgreSQL (which is used in production):
The same holds for Question.duplicate_question_and_answers.