blob: fa0c02e54139cc2475c3bdea3a086270736524dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# frozen_string_literal: true
class FillGhostUserType < ActiveRecord::Migration[6.0]
DOWNTIME = false
def up
execute('UPDATE users SET user_type = 5 WHERE ghost IS TRUE AND user_type IS NULL')
end
def down
execute('UPDATE users SET user_type = NULL WHERE ghost IS TRUE AND user_type IS NOT NULL')
end
end
|