chore: 调整金额表示格式
This commit is contained in:
@@ -15,8 +15,8 @@ export const redPacketDraws = pgTable("red_packet_draws", {
|
||||
userId: text("user_id").notNull(),
|
||||
|
||||
amount: numeric("amount", {
|
||||
precision: 20,
|
||||
scale: 10,
|
||||
precision: 38,
|
||||
scale: 8,
|
||||
}).notNull(),
|
||||
|
||||
createdAt: timestamp("created_at", { withTimezone: true })
|
||||
|
||||
@@ -21,10 +21,7 @@ export const redPackets = pgTable("red_packets", {
|
||||
count: integer("count").notNull(),
|
||||
|
||||
currencyName: text("currency_name").notNull(),
|
||||
currencyPrecision: numeric("currency_precision", {
|
||||
precision: 20,
|
||||
scale: 10,
|
||||
}).notNull(),
|
||||
currencyPrecision: integer("currency_precision").notNull(),
|
||||
|
||||
rule: jsonb("rule")
|
||||
.$type<CreateRedPacketPayload["rule"]>()
|
||||
|
||||
1
tonesc-red-packet/drizzle/0005_quiet_leech.sql
Normal file
1
tonesc-red-packet/drizzle/0005_quiet_leech.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE "red_packet_draws" ALTER COLUMN "amount" SET DATA TYPE numeric(38, 8);
|
||||
1
tonesc-red-packet/drizzle/0006_rare_maginty.sql
Normal file
1
tonesc-red-packet/drizzle/0006_rare_maginty.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE "red_packets" ALTER COLUMN "currency_precision" SET DATA TYPE integer;
|
||||
@@ -36,6 +36,20 @@
|
||||
"when": 1767792389199,
|
||||
"tag": "0004_overconfident_nova",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 5,
|
||||
"version": "7",
|
||||
"when": 1767924016559,
|
||||
"tag": "0005_quiet_leech",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 6,
|
||||
"version": "7",
|
||||
"when": 1767924109495,
|
||||
"tag": "0006_rare_maginty",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user