feat: add database migration script

This commit is contained in:
JustSong
2023-05-16 11:36:00 +08:00
parent 01abed0a30
commit 6d1e5cb5dc
2 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
UPDATE users
SET quota = quota + (
SELECT SUM(remain_quota)
FROM tokens
WHERE tokens.user_id = users.id
)