Files
sub2api/backend/migrations/200_channel_monitor_v2_rollup_permissions.sql
T
IanShaw027 a58048ac32 feat(channel-monitor-v2): 添加被动监控聚合表与模式相关迁移
引入 V2 事实表/固定 rollup、模式设置、忽略错误类、健康阈值、权限与
默认忽略/缓存阈值,以及用户端隐藏吞吐速率的系统设置键。
2026-08-07 11:05:32 +08:00

10 lines
468 B
SQL

-- Runtime aggregator reads/writes the fixed rollup caches through the role that
-- executes migrations. Use CURRENT_USER so custom DATABASE_USER values work;
-- PostgreSQL permits this form in GRANT and it remains idempotent.
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE
channel_monitor_v2_metrics_rollup,
channel_monitor_v2_user_metrics_rollup,
channel_monitor_v2_error_metrics_rollup,
channel_monitor_v2_latency_histograms_rollup
TO CURRENT_USER;