From e2da37959f4983ed558258a58ec645f6053259e1 Mon Sep 17 00:00:00 2001 From: Spacelord Date: Thu, 20 Feb 2025 23:57:36 +0100 Subject: [PATCH] add gtin field to db schema -> Wen cant use is as id since relations depend on type Int. Trying Float for price storage. I dont think this works.. --- prisma/schema.prisma | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index d2348d6..e9a474d 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -52,8 +52,9 @@ model sales { model products { id Int @id @unique @default(autoincrement()) + gtin String @unique // Dont try to use BigInt -> https://github.com/prisma/studio/issues/614 name String @unique - price Float + price Float // FIXME: input: 77.80 -> output: 77.8 stock Int visible Boolean @default(true)