diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-10-20 08:02:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-20 08:02:44 +0200 |
commit | fd5285658f477c5b6a9c7af0935b5c889729b2e0 (patch) | |
tree | 42f11c5da1570ddfc6820e5bab6b22202c24c158 /db | |
parent | d5bfba3262cf531d767f583a79fc2fbe8bff93b4 (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.rb | 17 | ||||
-rw-r--r-- | db/schema.rb | 1 |
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 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 diff --git a/db/schema.rb b/db/schema.rb index 046975ac9..8facfa259 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 |