Accepts incoming events and correctly parses them into events. GeoLite2 integration complete"
This commit is contained in:
64
db/schema.rb
64
db/schema.rb
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.1].define(version: 2025_11_03_035249) do
|
||||
ActiveRecord::Schema[8.1].define(version: 2025_11_03_130430) do
|
||||
create_table "events", force: :cascade do |t|
|
||||
t.string "agent_name"
|
||||
t.string "agent_version"
|
||||
@@ -24,7 +24,7 @@ ActiveRecord::Schema[8.1].define(version: 2025_11_03_035249) do
|
||||
t.json "payload"
|
||||
t.integer "project_id", null: false
|
||||
t.integer "request_host_id"
|
||||
t.string "request_method"
|
||||
t.integer "request_method"
|
||||
t.string "request_path"
|
||||
t.string "request_protocol"
|
||||
t.string "request_segment_ids"
|
||||
@@ -36,7 +36,7 @@ ActiveRecord::Schema[8.1].define(version: 2025_11_03_035249) do
|
||||
t.datetime "timestamp", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.text "user_agent"
|
||||
t.string "waf_action"
|
||||
t.integer "waf_action"
|
||||
t.index ["event_id"], name: "index_events_on_event_id", unique: true
|
||||
t.index ["ip_address"], name: "index_events_on_ip_address"
|
||||
t.index ["project_id", "ip_address"], name: "index_events_on_project_id_and_ip_address"
|
||||
@@ -50,7 +50,7 @@ ActiveRecord::Schema[8.1].define(version: 2025_11_03_035249) do
|
||||
t.index ["waf_action"], name: "index_events_on_waf_action"
|
||||
end
|
||||
|
||||
create_table "network_ranges", force: :cascade do |t|
|
||||
create_table "ipv4_ranges", force: :cascade do |t|
|
||||
t.text "abuser_scores"
|
||||
t.text "additional_data"
|
||||
t.integer "asn"
|
||||
@@ -58,21 +58,44 @@ ActiveRecord::Schema[8.1].define(version: 2025_11_03_035249) do
|
||||
t.string "company"
|
||||
t.datetime "created_at", null: false
|
||||
t.string "geo2_country"
|
||||
t.binary "ip_address", null: false
|
||||
t.string "ip_api_country"
|
||||
t.integer "ip_version", null: false
|
||||
t.boolean "is_datacenter", default: false
|
||||
t.boolean "is_proxy", default: false
|
||||
t.boolean "is_vpn", default: false
|
||||
t.datetime "last_api_fetch"
|
||||
t.integer "network_end", limit: 8, null: false
|
||||
t.integer "network_prefix", null: false
|
||||
t.integer "network_start", limit: 8, null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["asn"], name: "idx_network_ranges_asn"
|
||||
t.index ["company"], name: "idx_network_ranges_company"
|
||||
t.index ["ip_address", "network_prefix"], name: "idx_network_ranges_ip_range"
|
||||
t.index ["ip_api_country"], name: "idx_network_ranges_country"
|
||||
t.index ["ip_version"], name: "idx_network_ranges_version"
|
||||
t.index ["is_datacenter", "is_proxy", "is_vpn"], name: "idx_network_ranges_flags"
|
||||
t.index ["asn"], name: "idx_ipv4_asn"
|
||||
t.index ["company"], name: "idx_ipv4_company"
|
||||
t.index ["ip_api_country"], name: "idx_ipv4_country"
|
||||
t.index ["is_datacenter", "is_proxy", "is_vpn"], name: "idx_ipv4_flags"
|
||||
t.index ["network_start", "network_end", "network_prefix"], name: "idx_ipv4_range_lookup"
|
||||
end
|
||||
|
||||
create_table "ipv6_ranges", force: :cascade do |t|
|
||||
t.text "abuser_scores"
|
||||
t.text "additional_data"
|
||||
t.integer "asn"
|
||||
t.string "asn_org"
|
||||
t.string "company"
|
||||
t.datetime "created_at", null: false
|
||||
t.string "geo2_country"
|
||||
t.string "ip_api_country"
|
||||
t.boolean "is_datacenter", default: false
|
||||
t.boolean "is_proxy", default: false
|
||||
t.boolean "is_vpn", default: false
|
||||
t.datetime "last_api_fetch"
|
||||
t.binary "network_end", limit: 16, null: false
|
||||
t.integer "network_prefix", null: false
|
||||
t.binary "network_start", limit: 16, null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["asn"], name: "idx_ipv6_asn"
|
||||
t.index ["company"], name: "idx_ipv6_company"
|
||||
t.index ["ip_api_country"], name: "idx_ipv6_country"
|
||||
t.index ["is_datacenter", "is_proxy", "is_vpn"], name: "idx_ipv6_flags"
|
||||
t.index ["network_start", "network_end", "network_prefix"], name: "idx_ipv6_range_lookup"
|
||||
end
|
||||
|
||||
create_table "path_segments", force: :cascade do |t|
|
||||
@@ -101,6 +124,13 @@ ActiveRecord::Schema[8.1].define(version: 2025_11_03_035249) do
|
||||
t.index ["slug"], name: "index_projects_on_slug", unique: true
|
||||
end
|
||||
|
||||
create_table "request_actions", force: :cascade do |t|
|
||||
t.string "action", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["action"], name: "index_request_actions_on_action", unique: true
|
||||
end
|
||||
|
||||
create_table "request_hosts", force: :cascade do |t|
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "first_seen_at", null: false
|
||||
@@ -148,14 +178,18 @@ ActiveRecord::Schema[8.1].define(version: 2025_11_03_035249) do
|
||||
t.datetime "expires_at"
|
||||
t.json "metadata"
|
||||
t.integer "priority"
|
||||
t.integer "rule_set_id", null: false
|
||||
t.string "rule_type"
|
||||
t.string "source", limit: 100
|
||||
t.string "target"
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["rule_set_id"], name: "index_rules_on_rule_set_id"
|
||||
t.index ["enabled"], name: "index_rules_on_enabled"
|
||||
t.index ["expires_at"], name: "index_rules_on_expires_at"
|
||||
t.index ["rule_type", "enabled"], name: "idx_rules_type_enabled"
|
||||
t.index ["rule_type"], name: "index_rules_on_rule_type"
|
||||
t.index ["source"], name: "index_rules_on_source"
|
||||
t.index ["updated_at", "id"], name: "idx_rules_sync"
|
||||
end
|
||||
|
||||
add_foreign_key "events", "projects"
|
||||
add_foreign_key "events", "request_hosts"
|
||||
add_foreign_key "rules", "rule_sets"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user