Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
c02c1205
Commit
c02c1205
authored
Jan 12, 2026
by
IanShaw027
Browse files
feat(ops): 添加 count_tokens 错误标记数据库迁移
- 新增 is_count_tokens 布尔字段到 ops_error_logs 表 - 默认值为 false - 支持后续动态过滤统计
parent
4da681f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/migrations/036_ops_error_logs_add_is_count_tokens.sql
0 → 100644
View file @
c02c1205
-- Migration: 添加 is_count_tokens 字段到 ops_error_logs 表
-- Purpose: 标记 count_tokens 请求的错误,以便在统计和告警中根据配置动态过滤
-- Author: System
-- Date: 2026-01-12
-- Add is_count_tokens column to ops_error_logs table
ALTER
TABLE
ops_error_logs
ADD
COLUMN
is_count_tokens
BOOLEAN
NOT
NULL
DEFAULT
FALSE
;
-- Add comment
COMMENT
ON
COLUMN
ops_error_logs
.
is_count_tokens
IS
'是否为 count_tokens 请求的错误(用于统计过滤)'
;
-- Create index for filtering (optional, improves query performance)
CREATE
INDEX
IF
NOT
EXISTS
idx_ops_error_logs_is_count_tokens
ON
ops_error_logs
(
is_count_tokens
)
WHERE
is_count_tokens
=
TRUE
;
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