7b08029e2e
根因:AssetModel 定义了 storage_key 列,但 assets 表从未包含此列。 SQLAlchemy 的 session.query(AssetModel) 生成 SELECT 时包含 assets.storage_key,导致 PostgreSQL 报错 column does not exist。 影响端点: - GET /api/v1/assets?library_id=xxx → 500 - POST /api/v1/generation/tasks → 500(调用 find_by_library 验证素材) - GET /api/v1/dashboard/overview → 500(调用 count_by_project_ids 统计) 修复:删除 models.py 中 AssetModel 的 storage_key 列定义。 域实体的 storage_key 字段通过 _to_domain() 从 model.file_url 映射,不受影响。