feat(style-preset): 增加画风预设目录表与接口 - #614
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
✅ 此 PR 已关联 issue,之前的提醒已自动标记为已解决。 |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #614 +/- ##
==========================================
+ Coverage 86.52% 86.58% +0.06%
==========================================
Files 293 297 +4
Lines 21902 22028 +126
Branches 3329 3329
==========================================
+ Hits 18951 19074 +123
- Misses 2021 2023 +2
- Partials 930 931 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
f1fc9af to
82c9cf1
Compare
|
这个 PR 有对 数据库有变更吗? |
结论有数据库相关变更,具体如下:
相关文件: |
当前是如何做数据库迁移的? 自动建表和数据库表字段变更在当前项目需要怎么做? |
结论当前项目没有使用 Alembic 或其他版本化数据库迁移工具,也没有发现迁移目录、迁移脚本或独立 SQL migration 命令。
自动建表的边界
当前项目字段变更做法目前需要由开发者编写并执行针对生产数据库的 SQL,例如: ALTER TABLE windup_style_preset
ADD COLUMN example_field TEXT NOT NULL DEFAULT '';建议流程是:
从长期维护看,建议引入 Alembic:为每次模型变更生成 revision,部署时执行 |
运营可配置画风种类、参考图、提示词和精灵尺寸。前端用列表接口选档,把字段填回项目已有约束。 Refs 1024XEngineer#475
省略字段仍可部分更新;传入 null 时返回 400,避免写入非空列后 500。
rebase 到 main 后按现有应用重导 OpenAPI。
0178bad to
5fac2db
Compare
|
Deployment failed for project windup with the following error: Learn More: https://vercel.com/huyan-s-projects1?upgradeToPro=build-rate-limit |
Summary
windup_style_preset运营目录:画风种类、必填参考图、提示词、像素化开关,以及与项目对齐的精灵图集宽高。GET /style-presets列表,以及POST/PATCH供后续管理端维护;单条查询留给管理端再加。game_style/sprite_sample_url/sprite_width/sprite_height,不改生成编排。Refs #475
Close #475
Test plan
pytest tests/test_style_preset.py通过GET /style-presets未登录返回 401sort_order返回,enabled=0不出现code返回 400;PATCH可下架并从列表消失/style-presets