diff --git a/internal/db/migrator/goose/postgres/202607200001_add_openresty_default_limit_req_per_ip.sql b/internal/db/migrator/goose/postgres/202607200001_add_openresty_default_limit_req_per_ip.sql index 553265ef..5755eea6 100644 --- a/internal/db/migrator/goose/postgres/202607200001_add_openresty_default_limit_req_per_ip.sql +++ b/internal/db/migrator/goose/postgres/202607200001_add_openresty_default_limit_req_per_ip.sql @@ -4,9 +4,9 @@ VALUES ('openresty_default_limit_req_per_ip', '', 'business', 0, '默认单 IP 请求频率限制(空关闭,例如 10r/s、100r/m)', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP) ON CONFLICT (key) DO NOTHING; -ALTER TABLE w_of_proxy_routes ADD COLUMN limit_req_per_ip VARCHAR(32) NOT NULL DEFAULT ''; +ALTER TABLE of_proxy_routes ADD COLUMN limit_req_per_ip VARCHAR(32) NOT NULL DEFAULT ''; -- +goose Down -ALTER TABLE w_of_proxy_routes DROP COLUMN limit_req_per_ip; +ALTER TABLE of_proxy_routes DROP COLUMN limit_req_per_ip; DELETE FROM w_system_configs WHERE key = 'openresty_default_limit_req_per_ip'; diff --git a/internal/db/migrator/goose/sqlite/202607200001_add_openresty_default_limit_req_per_ip.sql b/internal/db/migrator/goose/sqlite/202607200001_add_openresty_default_limit_req_per_ip.sql index 553265ef..5755eea6 100644 --- a/internal/db/migrator/goose/sqlite/202607200001_add_openresty_default_limit_req_per_ip.sql +++ b/internal/db/migrator/goose/sqlite/202607200001_add_openresty_default_limit_req_per_ip.sql @@ -4,9 +4,9 @@ VALUES ('openresty_default_limit_req_per_ip', '', 'business', 0, '默认单 IP 请求频率限制(空关闭,例如 10r/s、100r/m)', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP) ON CONFLICT (key) DO NOTHING; -ALTER TABLE w_of_proxy_routes ADD COLUMN limit_req_per_ip VARCHAR(32) NOT NULL DEFAULT ''; +ALTER TABLE of_proxy_routes ADD COLUMN limit_req_per_ip VARCHAR(32) NOT NULL DEFAULT ''; -- +goose Down -ALTER TABLE w_of_proxy_routes DROP COLUMN limit_req_per_ip; +ALTER TABLE of_proxy_routes DROP COLUMN limit_req_per_ip; DELETE FROM w_system_configs WHERE key = 'openresty_default_limit_req_per_ip';