Files
wechatWeb/_docs/sql/alter_plan_api_permission.sql
张成 14f5d75d9d 1
2026-04-01 09:59:54 +08:00

15 lines
718 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 在「与后端 app 相同」的 MySQL 库中执行(否则会一直报 Unknown column
-- 可重复执行:若列已存在会报错,可忽略对应语句或改用 scripts/migrate_biz_plan_api_columns.js
SET NAMES utf8mb4;
-- biz_plans分两条方便只缺其中一列时单独执行
ALTER TABLE `biz_plans`
ADD COLUMN `allowed_apis` JSON DEFAULT NULL COMMENT '可访问的接口路径列表null=不限制';
ALTER TABLE `biz_plans`
ADD COLUMN `api_call_quota` INT NOT NULL DEFAULT 0 COMMENT '每月API总调用次数上限0=不限制';
-- biz_usage_monthly
ALTER TABLE `biz_usage_monthly`
ADD COLUMN `api_call_count` INT NOT NULL DEFAULT 0 COMMENT '当月API转发总调用次数';