Commit eb59e225 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

Add gateway_listeners table and related indexes to WAF migration

parent ab7a181b
...@@ -35,8 +35,21 @@ CREATE TABLE waf_rule_categories ( ...@@ -35,8 +35,21 @@ CREATE TABLE waf_rule_categories (
rules JSON NOT NULL 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 -- Add indexes for better query performance
CREATE INDEX idx_waf_services_gateway_name ON waf_services(gateway_name); 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_services_namespace ON waf_services(namespace);
CREATE INDEX idx_waf_rules_category_id ON waf_rules(category_id); 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_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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment