refactor: 彻底移除 Sora 视频生成模块(全栈清理)
## 后端变更 - 删除 21 个 sora_*.go 服务文件(service/handler/repository/routes) - 删除 Sora 相关 migration 文件(046/047/063/090) - 清理 config 中的 sora_* 配置项和平台常量 - 清理 wire 依赖注入中的 Sora 组件 - 修复 wire_gen.go 语法错误(缺少逗号和闭合括号) - 移除 go.mod 中的 go-sora2api 依赖 - 更新 ent schema usage_log.go 注释 ## 前端变更 - 删除 SoraView、SoraAdminView 及 8 个 Sora 子组件 - 删除 sora API 层和路由配置 - 清理 UserEditModal 中的 Sora 存储配额 UI - 清理 types/index.ts 中 Sora 相关类型定义 - 清理 stores/app.ts 默认配置 - 清理 i18n 翻译文件 en.ts/zh.ts (~110 行) - 更新相关测试文件 ## 文档更新 - README.md / README_CN.md / README_JA.md: 移除 Sora 状态说明和配置段落 - PROJECT_DIFF.md: 移除 Sora 相关差异描述 ## 验证结果 - ✅ Go 编译通过 (go build ./...) - ✅ TypeScript 类型检查通过 (vue-tsc --noEmit) - ✅ 后端测试全通过 (0 failures) - ✅ 前端测试全通过 (59 files, 329 tests, 0 failures) - ✅ 前端生产构建成功 (23.81s)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
-- Migration: 045_add_accounts_extra_index
|
||||
-- 为 accounts.extra 字段添加 GIN 索引,优化 FindByExtraField 查询性能
|
||||
-- 用于支持通过 extra 字段中的 linked_openai_account_id 快速查找关联的 Sora 账号
|
||||
-- 用于支持通过 extra 字段中的 linked_openai_account_id 快速查找关联的账号
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_accounts_extra_gin
|
||||
ON accounts USING GIN (extra);
|
||||
@@ -8,6 +8,5 @@ ON accounts USING GIN (extra);
|
||||
-- 查询示例(使用 @> 操作符)
|
||||
-- EXPLAIN ANALYZE
|
||||
-- SELECT * FROM accounts
|
||||
-- WHERE platform = 'sora'
|
||||
-- AND extra @> '{"linked_openai_account_id": 123}'::jsonb
|
||||
-- WHERE extra @> '{"linked_openai_account_id": 123}'::jsonb
|
||||
-- AND deleted_at IS NULL;
|
||||
|
||||
Reference in New Issue
Block a user