Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
qiuqunfeng
waf-console
Commits
eb59e225
Commit
eb59e225
authored
Feb 17, 2025
by
qiuqunfeng
Browse files
Add gateway_listeners table and related indexes to WAF migration
parent
ab7a181b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
db/migrations/create_waf_tables.sql
db/migrations/create_waf_tables.sql
+14
-1
No files found.
db/migrations/create_waf_tables.sql
View file @
eb59e225
...
...
@@ -35,8 +35,21 @@ CREATE TABLE waf_rule_categories (
rules
JSON
NOT
NULL
);
-- Create gateway_listeners table
CREATE
TABLE
gateway_listeners
(
id
SERIAL
PRIMARY
KEY
,
gateway_name
VARCHAR
(
255
)
NOT
NULL
,
namespace
VARCHAR
(
255
)
NOT
NULL
,
region_code
VARCHAR
(
50
)
NOT
NULL
,
port
INTEGER
NOT
NULL
,
enable
BOOLEAN
NOT
NULL
);
-- Add indexes for better query performance
CREATE
INDEX
idx_waf_services_gateway_name
ON
waf_services
(
gateway_name
);
CREATE
INDEX
idx_waf_services_namespace
ON
waf_services
(
namespace
);
CREATE
INDEX
idx_waf_rules_category_id
ON
waf_rules
(
category_id
);
CREATE
INDEX
idx_waf_rule_categories_category_id
ON
waf_rule_categories
(
category_id
);
CREATE
INDEX
idx_gateway_listeners_gateway_name
ON
gateway_listeners
(
gateway_name
);
CREATE
INDEX
idx_gateway_listeners_namespace
ON
gateway_listeners
(
namespace
);
CREATE
INDEX
idx_gateway_listeners_region_code
ON
gateway_listeners
(
region_code
);
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment