The following groups of SQLite code messages are called by a dialog box:
@messages=Message.where("messages.sender_id = (?) OR messages.recipient_id = (?)" , current_user.id, current_user.id).group("messages.conversation_id")
When switching to Heroku, this code is not recognized by Postgres. Looking at the logs, I was told to add all the message columns to GROUP BY - bringing me to this functional code:
@messages=Message.where("messages.sender_id = (?) OR messages.recipient_id = (?)" , current_user.id, current_user.id).group("messages.conversation_id , messages.updated_at, messages.id, messages.sender_id , messages.recipient_id, messages.sender_deleted , messages.recipient_deleted, messages.body, messages.read_at , messages.ancestry, messages.ancestry_depth, messages.created_at")
Only this code is not grouped in different ways. It simply displays all messages that satisfy the WHERE clause. Any ideas?
source share