Skip to content

Commit

Permalink
feat: add database migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed May 16, 2023
1 parent 01abed0 commit 6d1e5cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ _✨ All in one 的 OpenAI 接口,整合各种 API 访问方式,开箱即用
<a href="https://openai.justsong.cn/">在线演示</a>
</p>

> **Warning**:从 `v0.2` 版本升级到 `v0.3` 版本需要手动迁移数据库,请手动执行[数据库迁移脚本](./bin/migration_v0.2-v0.3.sql)

## 功能
1. 支持多种 API 访问渠道,欢迎 PR 或提 issue 添加更多渠道:
+ [x] OpenAI 官方通道
Expand Down
6 changes: 6 additions & 0 deletions bin/migration_v0.2-v0.3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
UPDATE users
SET quota = quota + (
SELECT SUM(remain_quota)
FROM tokens
WHERE tokens.user_id = users.id
)

0 comments on commit 6d1e5cb

Please sign in to comment.