chore: record journal
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
<!-- @@@auto:current-status -->
|
||||
- **Active File**: `journal-1.md`
|
||||
- **Total Sessions**: 2
|
||||
- **Total Sessions**: 3
|
||||
- **Last Active**: 2026-04-16
|
||||
<!-- @@@/auto:current-status -->
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<!-- @@@auto:active-documents -->
|
||||
| File | Lines | Status |
|
||||
|------|-------|--------|
|
||||
| `journal-1.md` | ~156 | Active |
|
||||
| `journal-1.md` | ~224 | Active |
|
||||
<!-- @@@/auto:active-documents -->
|
||||
|
||||
---
|
||||
@@ -29,6 +29,7 @@
|
||||
<!-- @@@auto:session-history -->
|
||||
| # | Date | Title | Commits |
|
||||
|---|------|-------|---------|
|
||||
| 3 | 2026-04-16 | 修复通知 targets 约束、合并注册脚本、路径缩短及清理重复索引 | `c79c773` |
|
||||
| 2 | 2026-04-16 | 新人初始礼包购买追踪功能实现 | `ff40ff9`, `fd0df28` |
|
||||
| 1 | 2026-04-16 | 新人初始礼包购买追踪功能 - 计划制定 | - |
|
||||
<!-- @@@/auto:session-history -->
|
||||
|
||||
@@ -154,3 +154,71 @@
|
||||
### Next Steps
|
||||
|
||||
- None - task complete
|
||||
|
||||
|
||||
## Session 3: 修复通知 targets 约束、合并注册脚本、路径缩短及清理重复索引
|
||||
|
||||
**Date**: 2026-04-16
|
||||
**Task**: 修复通知 targets 约束、合并注册脚本、路径缩短及清理重复索引
|
||||
|
||||
### Summary
|
||||
|
||||
(Add summary)
|
||||
|
||||
### Main Changes
|
||||
|
||||
## 完成的四项任务
|
||||
|
||||
| 任务 | 描述 |
|
||||
|------|------|
|
||||
| 重复索引清理 | 创建 Alembic migration drop `ix_llm_factory_name` 和 `ix_llms_model_code` |
|
||||
| 脚本合并 | `register-notifications.sh` 合并到 `dev-migrate.sh sync-notifications` 子命令 |
|
||||
| 路径缩短 | `static/notification/notifications/` → `static/notifications/` |
|
||||
| Targets 语义约束 | `NotificationTargetMode` 枚举 + 注册流程按 target_mode 分发通知 |
|
||||
|
||||
## 关键变更
|
||||
|
||||
| 模块 | 变更 |
|
||||
|------|------|
|
||||
| 枚举 | `NotificationTargetMode` (new_users/exist_users/all_users/user_ids) |
|
||||
| ORM | `Notification.target_mode` VARCHAR + CHECK constraint |
|
||||
| 注册流程 | `RegisterBonusResult.is_first_registration` 区分首次注册 |
|
||||
| 通知分发 | `link_notifications_for_registered_user` 按 target_mode 过滤 |
|
||||
| YAML | `welcome_points.yaml` mode 改为 `new_users` |
|
||||
| 死代码 | 删除 `link_published_notifications_to_user` |
|
||||
|
||||
## 数据库 Migration
|
||||
|
||||
- `20260416_0002_drop_duplicate_llm_indexes.py` - 清理重复索引
|
||||
- `20260416_0003_add_notification_target_mode.py` - 添加 target_mode 列
|
||||
|
||||
## 测试
|
||||
|
||||
- 44 个单元测试
|
||||
- 1 个集成测试 (注册 + 重新注册通知分发)
|
||||
- 全部通过
|
||||
|
||||
## 文件统计
|
||||
|
||||
- 26 files changed
|
||||
- +1011 insertions
|
||||
- -49 deletions
|
||||
|
||||
|
||||
### Git Commits
|
||||
|
||||
| Hash | Message |
|
||||
|------|---------|
|
||||
| `c79c773` | (see git log) |
|
||||
|
||||
### Testing
|
||||
|
||||
- [OK] (Add test results)
|
||||
|
||||
### Status
|
||||
|
||||
[OK] **Completed**
|
||||
|
||||
### Next Steps
|
||||
|
||||
- None - task complete
|
||||
|
||||
Reference in New Issue
Block a user