From 7cb23fd803e7d1e7f5f6da87e17650619bc9a7ba Mon Sep 17 00:00:00 2001 From: zhitomirskiyi Date: Mon, 31 Jan 2011 11:27:56 -0800 Subject: [PATCH] added a select for the actor id to group by it --- db/migrate/20110130072907_notification_multiple_people.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20110130072907_notification_multiple_people.rb b/db/migrate/20110130072907_notification_multiple_people.rb index 15902c3fb..1460d9e81 100644 --- a/db/migrate/20110130072907_notification_multiple_people.rb +++ b/db/migrate/20110130072907_notification_multiple_people.rb @@ -33,7 +33,7 @@ class NotificationMultiplePeople < ActiveRecord::Migration #to replace them execute "CREATE TEMPORARY TABLE keep_delete " + "( SELECT n1.keep_id, n2.id as delete_id, " + - "n1.target_type, n1.target_id, n1.recipient_id, n1.action " + + "n2.actor_id, n1.target_type, n1.target_id, n1.recipient_id, n1.action " + "FROM keep_table n1, notifications n2 " + "WHERE n1.keep_id != n2.id " + "AND n1.target_type = n2.target_type AND n1.target_id = n2.target_id " +