mirror of
https://github.com/discourse/discourse.git
synced 2025-06-13 11:40:13 +08:00
FIX: group user count was busted
This commit is contained in:
5
db/migrate/20150325183400_fix_group_user_count.rb
Normal file
5
db/migrate/20150325183400_fix_group_user_count.rb
Normal 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
|
Reference in New Issue
Block a user