mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 02:12:09 +08:00
FIX: Set user flair group to primary group (#13718)
This is a follow up to commit 87c1e98571631d83e0d9f0846bd95a2c7e9bce87 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:
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
|
Reference in New Issue
Block a user