fix: 修复管理员OSS配置缺失和数据库迁移问题

- 🐛 修复管理员无法配置OSS的问题(添加管理员OSS配置界面)
- 🐛 修复 database.js 迁移代码引用不存在的 has_ftp_config 字段
-  管理员设置页面新增OSS配置、空间统计、存储切换功能
- 📝 完善管理员OSS配置体验

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude Opus
2026-01-18 17:36:34 +08:00
parent 0b0e5b9d7c
commit e2806126a6
2 changed files with 95 additions and 4 deletions

View File

@@ -659,10 +659,6 @@ function migrateToV2() {
ALTER TABLE users ADD COLUMN local_storage_used INTEGER DEFAULT 0;
`);
// 更新现有用户为SFTP模式保持兼容
const updateStmt = db.prepare("UPDATE users SET current_storage_type = 'sftp' WHERE has_ftp_config = 1");
updateStmt.run();
console.log('[数据库迁移] ✓ 用户表已升级');
// 为分享表添加存储类型字段