summaryrefslogtreecommitdiffstats
path: root/db
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
parentd5bfba3262cf531d767f583a79fc2fbe8bff93b4 (diff)
Add option to block reports from domain (#8830)
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20181017170937_add_reject_reports_to_domain_blocks.rb17
-rw-r--r--db/schema.rb1
2 files changed, 18 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 00000000000..f05d50fcd93
--- /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
diff --git a/db/schema.rb b/db/schema.rb
index 046975ac99c..8facfa2595b 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -186,6 +186,7 @@ ActiveRecord::Schema.define(version: 2018_10_18_205649) do
t.datetime "updated_at", null: false
t.integer "severity", default: 0
t.boolean "reject_media", default: false, null: false
+ t.boolean "reject_reports", default: false, null: false
t.index ["domain"], name: "index_domain_blocks_on_domain", unique: true
end