mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Support an end date for user silencing
This commit is contained in:
14
db/migrate/20171113175414_add_silenced_till_to_users.rb
Normal file
14
db/migrate/20171113175414_add_silenced_till_to_users.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
Reference in New Issue
Block a user