${title}

基于 Alembic 的数据库版本化迁移,模型挂载在 litefs.database.models.Base

迁移命令

% for cmd in commands:
${cmd}
% endfor

命令需在本示例目录下执行,CLI 会从当前目录的 app.py 读取 database_url。

接口列表

% for endpoint in endpoints: % endfor
路径 说明
${endpoint['path']} ${endpoint['desc']}

表结构

  • categories —— 商品分类(id / name / description / 时间戳)
  • products —— 商品(id / name / price / stock / description / category_id / 时间戳)