hteen
V2EX  ›  问与答

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

  •  
  •   hteen · Feb 21, 2024 · 1016 views
    This topic created in 835 days ago, the information mentioned may be changed or developed.

    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'
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1075 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 23:28 · PVG 07:28 · LAX 16:28 · JFK 19:28
    ♥ Do have faith in what you're doing.