diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-05-10 03:48:11 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:23 -0500 |
commit | 3b06175e8f5cb9d688e8ec376dbfd88abf5f3278 (patch) | |
tree | 160a6f6c97777ca022326bb93701f358fe689c99 /db/migrate/20190510071027_update_account_warning_action_enum.rb | |
parent | 5c59d1837f2d3152342ef45bf7827495183e62dd (diff) |
Moderation: add `force sensitive` and `force unlisted` actions. Accounts: add federatable `adult content` tag. Handle from remote accounts as well.
Diffstat (limited to 'db/migrate/20190510071027_update_account_warning_action_enum.rb')
-rw-r--r-- | db/migrate/20190510071027_update_account_warning_action_enum.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20190510071027_update_account_warning_action_enum.rb b/db/migrate/20190510071027_update_account_warning_action_enum.rb new file mode 100644 index 000000000..b89fb60d2 --- /dev/null +++ b/db/migrate/20190510071027_update_account_warning_action_enum.rb @@ -0,0 +1,19 @@ +class UpdateAccountWarningActionEnum < ActiveRecord::Migration[5.2] + disable_ddl_transaction! + + def up + AccountWarning.where(action: :force_unlisted).each do |warning| + warning.severity = :suspend + warning.save + end + + AccountWarning.where(action: :force_sensitive).each do |warning| + warning.severity = :silence + warning.save + end + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end |