Skip to content

fix(storage): 将用户目录移至 data/users - #147

Open
LC044 wants to merge 5 commits into
masterfrom
codex/fix-user-storage-root
Open

fix(storage): 将用户目录移至 data/users#147
LC044 wants to merge 5 commits into
masterfrom
codex/fix-user-storage-root

Conversation

@LC044

@LC044 LC044 commented Aug 25, 2026

Copy link
Copy Markdown
Owner

描述

将默认用户存储目录从 data/uploads/users/<user_id> 调整为语义更清晰的 data/users/<user_id>

直接修改尚未发布的现有一次性数据库迁移:从旧版共享目录 data/uploads/uploadsdata/uploads/thumbnails 迁移到用户目录,并在迁移完成后安全删除空的旧目录。不会兼容未发布的中间目录 data/uploads/users

同时将目录树与批量移动的主存储范围收紧到当前用户的 uploads,并修复导入设置时更新存储缓存缺少 user_id 的问题。

变更类型

  • 🐛 修复错误 (Bug Fix)
  • ♻️ 代码重构 (Refactor)
  • ✅ 测试增加/修改 (Tests)

相关 Issue

Follow-up to #144 and #145

如何测试

  • python -m pytest tests/unit/test_user_storage.py tests/unit/test_settings_api.py -q(29 passed)
  • python -m pytest tests/unit/test_user_storage_migration.py tests/unit/test_sqlite_migration_schema.py tests/unit/test_start_database.py -q(6 passed)

检查清单

  • 我已阅读并遵循项目的贡献指南
  • 我的代码遵循项目的代码风格
  • 我已添加/更新了必要的测试
  • 所有已执行测试均已通过
  • 我已更新了相关注释

@LC044

LC044 commented Aug 25, 2026

Copy link
Copy Markdown
Owner Author

I have read and agree to the CLA

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploying trailsnap with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8c12657
Status: ✅  Deploy successful!
Preview URL: https://785fb41b.trailsnap-bfa.pages.dev
Branch Preview URL: https://codex-fix-user-storage-root.trailsnap-bfa.pages.dev

View logs

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.

1 participant