mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: group user count was busted
This commit is contained in:
parent
fae489b90a
commit
3a28d50866
1 changed files with 5 additions and 0 deletions
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
|
Loading…
Reference in a new issue