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
|
@ -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