V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
hteen
V2EX  ›  问与答

Prisma/Drizzle 的 decimal 为什么不支持 unsigned?

  •  
  •   hteen · 235 天前 · 503 次点击
    这是一个创建于 235 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Prisma

    amount Decimal @default(0) @db.Decimal(65, 18)
    

    Drizzle

    amount: decimal("amount", { precision: 65, scale: 18 }).notNull().default("0")
    

    需要实现执行迁移 push 之后

    mysql 字段为

    `amount` decimal(65,18) unsigned NOT NULL DEFAULT '0'
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2546 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 08:19 · PVG 16:19 · LAX 01:19 · JFK 04:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.