fix(authorization): 增大 progress_percentage 字段精度避免溢出

将 stickman_rankings 表的 progress_percentage 字段从 DECIMAL(5,2)
改为 DECIMAL(10,2),以支持超过 999.99% 的进度百分比。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-23 07:42:07 -08:00
parent 454b466993
commit 68621d3826
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
-- AlterTable: Increase progress_percentage precision from DECIMAL(5,2) to DECIMAL(10,2)
-- This allows storing percentages greater than 999.99% (e.g., when cumulative completed far exceeds target)
ALTER TABLE "stickman_rankings" ALTER COLUMN "progress_percentage" TYPE DECIMAL(10, 2);

View File

@ -308,7 +308,7 @@ model StickmanRanking {
currentMonth String @map("current_month")
cumulativeCompleted Int @map("cumulative_completed")
cumulativeTarget Int @map("cumulative_target")
progressPercentage Decimal @map("progress_percentage") @db.Decimal(5, 2)
progressPercentage Decimal @map("progress_percentage") @db.Decimal(10, 2)
exceedRatio Decimal @map("exceed_ratio") @db.Decimal(10, 4)
// 排名