0
0
Fork 0

Change e-mail domain blocks to block IPs dynamically (#17635)

* Change e-mail domain blocks to block IPs dynamically

* Update app/workers/scheduler/email_domain_block_refresh_scheduler.rb

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>

* Update app/workers/scheduler/email_domain_block_refresh_scheduler.rb

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
This commit is contained in:
Eugen Rochko 2022-02-24 17:28:23 +01:00 committed by GitHub
parent 91cc8d1e63
commit a29a982eaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 322 additions and 157 deletions

View file

@ -0,0 +1,6 @@
class AddIpsToEmailDomainBlocks < ActiveRecord::Migration[6.1]
def change
add_column :email_domain_blocks, :ips, :inet, array: true
add_column :email_domain_blocks, :last_refresh_at, :datetime
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_02_10_153119) do
ActiveRecord::Schema.define(version: 2022_02_24_010024) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -387,6 +387,9 @@ ActiveRecord::Schema.define(version: 2022_02_10_153119) do
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.bigint "parent_id"
t.inet "ips", array: true
t.datetime "last_refresh_at"
t.index ["domain"], name: "index_email_domain_blocks_on_domain", unique: true
end