about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-10-20 08:02:44 +0200
committerGitHub <noreply@github.com>2018-10-20 08:02:44 +0200
commitfd5285658f477c5b6a9c7af0935b5c889729b2e0 (patch)
tree42f11c5da1570ddfc6820e5bab6b22202c24c158 /db/migrate
parentd5bfba3262cf531d767f583a79fc2fbe8bff93b4 (diff)
Add option to block reports from domain (#8830)
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20181017170937_add_reject_reports_to_domain_blocks.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20181017170937_add_reject_reports_to_domain_blocks.rb b/db/migrate/20181017170937_add_reject_reports_to_domain_blocks.rb
new file mode 100644
index 000000000..f05d50fcd
--- /dev/null
+++ b/db/migrate/20181017170937_add_reject_reports_to_domain_blocks.rb
@@ -0,0 +1,17 @@
+require Rails.root.join('lib', 'mastodon', 'migration_helpers')
+
+class AddRejectReportsToDomainBlocks < ActiveRecord::Migration[5.2]
+  include Mastodon::MigrationHelpers
+
+  disable_ddl_transaction!
+
+  def up
+    safety_assured do
+      add_column_with_default :domain_blocks, :reject_reports, :boolean, default: false, allow_null: false
+    end
+  end
+
+  def down
+    remove_column :domain_blocks, :reject_reports
+  end
+end