Skip to content

feat: 补充数据库存储 usage_metadata 字段并新增自动迁移缺失列能力#43

Merged
helloopenworld merged 1 commit intomainfrom
jasindev/session
Apr 15, 2026
Merged

feat: 补充数据库存储 usage_metadata 字段并新增自动迁移缺失列能力#43
helloopenworld merged 1 commit intomainfrom
jasindev/session

Conversation

@Rook1ex
Copy link
Copy Markdown
Contributor

@Rook1ex Rook1ex commented Apr 15, 2026

- SessionStorageEvent 新增 usage_metadata 列,支持存储和读取 token 用量统计
- 新增 decode_usage_metadata 工具函数用于反序列化
- 新增 _migrate_missing_columns 方法,自动检测并 ALTER TABLE 添加 ORM 模型中新增但数据库缺失的列

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 15, 2026

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@Rook1ex Rook1ex requested a review from helloopenworld April 15, 2026 03:58
@Rook1ex
Copy link
Copy Markdown
Contributor Author

Rook1ex commented Apr 15, 2026

I have read the CLA Document and I hereby sign the CLA

@Rook1ex Rook1ex force-pushed the jasindev/session branch 2 times, most recently from 7569e8d to e7138e2 Compare April 15, 2026 06:40
@Rook1ex
Copy link
Copy Markdown
Contributor Author

Rook1ex commented Apr 15, 2026

recheck

    - SessionStorageEvent 新增 usage_metadata 列,支持存储和读取 token 用量统计
    - 新增 decode_usage_metadata 工具函数用于反序列化
    - 新增 _migrate_missing_columns 方法,自动检测并 ALTER TABLE 添加 ORM 模型中新增但数据库缺失的列
Rook1ex added a commit to trpc-group/cla-database that referenced this pull request Apr 15, 2026
@helloopenworld helloopenworld merged commit 0c9f4e1 into main Apr 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants