feat: Add support for account abuse detection (#11001)

This PR adds service to automate account abuse detection. Currently
based on the signup name and URL, could potentially add more context
such as usage analysis, message metadata etc.
This commit is contained in:
Pranav
2025-02-28 15:28:19 -08:00
committed by GitHub
parent 616bbced9c
commit ecfa6bf6a2
25 changed files with 744 additions and 22 deletions

View File

@@ -0,0 +1,5 @@
class AddInternalAttributesToAccounts < ActiveRecord::Migration[7.0]
def change
add_column :accounts, :internal_attributes, :jsonb, null: false, default: {}
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2025_02_07_040150) do
ActiveRecord::Schema[7.0].define(version: 2025_02_28_185548) do
# These extensions should be enabled to support this database
enable_extension "pg_stat_statements"
enable_extension "pg_trgm"
@@ -57,6 +57,7 @@ ActiveRecord::Schema[7.0].define(version: 2025_02_07_040150) do
t.jsonb "limits", default: {}
t.jsonb "custom_attributes", default: {}
t.integer "status", default: 0
t.jsonb "internal_attributes", default: {}, null: false
t.index ["status"], name: "index_accounts_on_status"
end