The server-proxied upload flow (replaces presign-PUT) stores the file-level metadata directly on the UploadSessions row at session creation, so step 2 (PUT bytes) can build the StorageObjects row without re-sending metadata through a separate CompleteUploadRequest. New columns on upload_sessions: file_name VARCHAR(255) NOT NULL DEFAULT '' usage_type VARCHAR(32) NOT NULL DEFAULT 'working_copy' visibility VARCHAR(16) NOT NULL DEFAULT 'private' is_immutable TINYINT(1) NOT NULL DEFAULT 0 The SQLAlchemy model already declares these columns; this migration applies the schema change to MySQL. Migration: c3d4e5f6a7b8_upload_session_object_metadata.py (chains off a2b3c4d5e6f7)
Migrations
MySQL 8 Alembic 迁移目录。
当前链路:
20260724_0001 完整业务 Schema 基线
20260728_0002 Demo 用户、角色、Workspace 数据
20260728_0003 调度稳定版本可见性字段
20260730_0004 编辑租约字段 redis_lock_key -> lock_key 兼容迁移
Docker Compose 中的 migrate 一次性容器会在 Backend 和 Runtime 启动前执行:
alembic upgrade head
本地执行:
export DATABASE_URL='mysql+asyncmy://user:password@127.0.0.1:3308/model_platform?charset=utf8mb4'
uv run --package backend alembic current
uv run --package backend alembic upgrade head
已发布的旧 revision 不应再修改;后续表结构调整必须新增 revision。