mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 04:59:22 -06:00
FIX: Set user flair group to primary group (#13718)
This is a follow up to commit 87c1e98571
which introduced different fields for primary and flair groups. Before
that, primary group was used as a flair group too.
This commit is contained in:
parent
21cf1b78da
commit
4ba93aac66
11
db/migrate/20210713092503_set_users_flair_group_id.rb
Normal file
11
db/migrate/20210713092503_set_users_flair_group_id.rb
Normal file
@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class SetUsersFlairGroupId < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
execute <<~SQL
|
||||
UPDATE users
|
||||
SET flair_group_id = primary_group_id
|
||||
WHERE flair_group_id IS NULL
|
||||
SQL
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user