FIX: group user count was busted

This commit is contained in:
Régis Hanol 2015-03-25 19:39:43 +01:00
parent fae489b90a
commit 3a28d50866

View file

@ -0,0 +1,5 @@
class FixGroupUserCount < ActiveRecord::Migration
def change
execute "UPDATE groups g SET user_count = (SELECT COUNT(user_id) FROM group_users gu WHERE gu.group_id = g.id)"
end
end