diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2020-11-08 00:28:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-08 00:28:39 +0100 |
commit | 3134691948aeacb16b7386ed77bbea4581beec40 (patch) | |
tree | 45ecf62f19879f08bf4c35584c58a64ea09c0c27 /db/post_migrate | |
parent | ee8cf246cfe8e05914ad7dcf81596f8535b3e161 (diff) |
Add support for reversible suspensions through ActivityPub (#14989)
Diffstat (limited to 'db/post_migrate')
-rw-r--r-- | db/post_migrate/20201017234926_fill_account_suspension_origin.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/db/post_migrate/20201017234926_fill_account_suspension_origin.rb b/db/post_migrate/20201017234926_fill_account_suspension_origin.rb new file mode 100644 index 000000000..ab7407d79 --- /dev/null +++ b/db/post_migrate/20201017234926_fill_account_suspension_origin.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class FillAccountSuspensionOrigin < ActiveRecord::Migration[5.2] + disable_ddl_transaction! + + def up + Account.suspended.where(suspension_origin: nil).in_batches.update_all(suspension_origin: :local) + end + + def down; end +end |