mdserver-web/plugins/op_waf/conf/init.sql

28 lines
735 B
MySQL
Raw Permalink Normal View History

2022-10-20 08:59:15 -04:00
PRAGMA synchronous = 0;
PRAGMA page_size = 4096;
PRAGMA journal_mode = wal;
PRAGMA journal_size_limit = 1073741824;
2022-10-20 11:40:28 -04:00
CREATE TABLE IF NOT EXISTS `logs` (
2022-10-20 08:59:15 -04:00
`time` INTEGER,
`ip` TEXT,
`domain` TEXT,
`server_name` TEXT,
`method` TEXT,
`status_code` INTEGER,
2022-10-21 05:34:38 -04:00
`user_agent` TEXT,
2022-10-20 08:59:15 -04:00
`uri` TEXT,
2022-10-20 11:40:28 -04:00
`rule_name` TEXT,
2022-10-20 08:59:15 -04:00
`reason` TEXT
);
2025-08-22 07:54:49 -04:00
CREATE INDEX time_idx ON logs(`time`);
CREATE INDEX ip_idx ON logs (`ip`);
CREATE INDEX uri_idx ON logs (`uri`);
CREATE INDEX method_idx ON logs (`method`);
CREATE INDEX server_name_idx ON logs (`server_name`);
CREATE INDEX status_code_idx ON logs (`status_code`);
CREATE INDEX all_union_idx ON logs (`status_code`, `time`, `ip`, `domain`, `server_name`, `method`, `uri`);