mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 00:43:39 +08:00
15 lines
335 B
Ruby
15 lines
335 B
Ruby
class AddSilencedTillToUsers < ActiveRecord::Migration[5.1]
|
|
def up
|
|
add_column :users, :silenced_till, :timestamp, null: true
|
|
execute <<~SQL
|
|
UPDATE users
|
|
SET silenced_till = CURRENT_TIMESTAMP + INTERVAL '1000 YEAR'
|
|
WHERE silenced
|
|
SQL
|
|
end
|
|
|
|
def down
|
|
add_column :users, :silenced_till
|
|
end
|
|
end
|