Add WafPolicies
This commit is contained in:
28
db/schema.rb
28
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_08_042936) do
|
||||
ActiveRecord::Schema[8.1].define(version: 2025_11_10_023232) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_catalog.plpgsql"
|
||||
|
||||
@@ -27,8 +27,6 @@ ActiveRecord::Schema[8.1].define(version: 2025_11_08_042936) do
|
||||
t.string "agent_name"
|
||||
t.string "agent_version"
|
||||
t.text "blocked_reason"
|
||||
t.string "city"
|
||||
t.string "country_code"
|
||||
t.datetime "created_at", null: false
|
||||
t.string "environment"
|
||||
t.string "event_id", null: false
|
||||
@@ -140,6 +138,7 @@ ActiveRecord::Schema[8.1].define(version: 2025_11_08_042936) do
|
||||
t.string "source", limit: 100, default: "manual"
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "user_id"
|
||||
t.bigint "waf_policy_id"
|
||||
t.index ["action"], name: "index_rules_on_action"
|
||||
t.index ["enabled", "expires_at"], name: "idx_rules_active"
|
||||
t.index ["enabled"], name: "index_rules_on_enabled"
|
||||
@@ -151,6 +150,8 @@ ActiveRecord::Schema[8.1].define(version: 2025_11_08_042936) do
|
||||
t.index ["source"], name: "index_rules_on_source"
|
||||
t.index ["updated_at", "id"], name: "idx_rules_sync"
|
||||
t.index ["user_id"], name: "index_rules_on_user_id"
|
||||
t.index ["waf_policy_id"], name: "idx_rules_waf_policy"
|
||||
t.index ["waf_policy_id"], name: "index_rules_on_waf_policy_id"
|
||||
end
|
||||
|
||||
create_table "sessions", force: :cascade do |t|
|
||||
@@ -171,9 +172,30 @@ ActiveRecord::Schema[8.1].define(version: 2025_11_08_042936) do
|
||||
t.index ["email_address"], name: "index_users_on_email_address", unique: true
|
||||
end
|
||||
|
||||
create_table "waf_policies", force: :cascade do |t|
|
||||
t.string "action", default: "deny", null: false
|
||||
t.json "additional_data", default: {}
|
||||
t.datetime "created_at", null: false
|
||||
t.text "description"
|
||||
t.boolean "enabled", default: true, null: false
|
||||
t.datetime "expires_at"
|
||||
t.string "name", null: false
|
||||
t.string "policy_type", default: "country", null: false
|
||||
t.json "targets", default: []
|
||||
t.datetime "updated_at", null: false
|
||||
t.bigint "user_id", null: false
|
||||
t.index ["enabled"], name: "index_waf_policies_on_enabled"
|
||||
t.index ["expires_at"], name: "index_waf_policies_on_expires_at"
|
||||
t.index ["name"], name: "index_waf_policies_on_name", unique: true
|
||||
t.index ["policy_type", "enabled"], name: "idx_waf_policies_type_enabled"
|
||||
t.index ["user_id"], name: "index_waf_policies_on_user_id"
|
||||
end
|
||||
|
||||
add_foreign_key "events", "request_hosts"
|
||||
add_foreign_key "network_ranges", "users"
|
||||
add_foreign_key "rules", "network_ranges"
|
||||
add_foreign_key "rules", "users"
|
||||
add_foreign_key "rules", "waf_policies"
|
||||
add_foreign_key "sessions", "users"
|
||||
add_foreign_key "waf_policies", "users"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user