Bastien Etienne
06/08/2022, 8:58 AMmodel cibest_user {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
date_created DateTime @default(now()) @db.Timestamp()
first_name String @db.VarChar(64)
last_name String @db.VarChar(64)
email String @unique @db.VarChar(64)
password String @db.VarChar()
login String @unique @db.VarChar(32)
//ldap_account
// ldap_id
networks network[]
tokens token[]
}
enum typeToken {
EMAIL
API
}
model token {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
date_created DateTime? @default(now()) @db.Timestamp()
date_updated DateTime? @db.Timestamp()
type_token typeToken
refresh_token String @db.VarChar()
valid Boolean @default(false)
expiration DateTime @db.Timestamp()
email_token String? @db.VarChar()
//relation field
cibest_user_id String @db.Uuid
cibest_user cibest_user @relation(fields: [cibest_user_id], references: [id])
}
Vivek Poddar
06/08/2022, 10:20 AMcreatedAt
and updatedAt
fields on all Models? right now I have to type them for each one of them, there are few exceptions thoughAurora
06/08/2022, 11:17 AMAmirHossein Ahmadi
06/08/2022, 12:18 PMprisma client generate
every time after prisma migrate deploy
?AmirHossein Ahmadi
06/08/2022, 12:20 PMprisma migrate deploy
?arnob chowdhury
06/08/2022, 12:40 PMAmirHossein Ahmadi
06/08/2022, 4:48 PMMischa
06/08/2022, 6:04 PM{"code":"P2002","clientVersion":"3.14.0","meta":{"target":["someColumn"]}}
Amol Patel
06/08/2022, 6:54 PMDog
06/08/2022, 7:01 PMAbraham Elmahrek
06/08/2022, 7:52 PMR
06/08/2022, 11:10 PMJunyu Yang
06/09/2022, 5:36 AMJunyu Yang
06/09/2022, 5:36 AMJunyu Yang
06/09/2022, 5:37 AMJunyu Yang
06/09/2022, 5:37 AMJunyu Yang
06/09/2022, 5:37 AMThangavel P
06/09/2022, 5:55 AMMichael Roberts
06/09/2022, 8:19 AMMike Härtl
06/09/2022, 1:15 PM`updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
I found @default(now())
but struggle with the ON UPDATE CURRENT_TIMESTAMP
ZB
06/09/2022, 1:19 PMBruno Orosco
06/09/2022, 7:26 PMProductPrinciple
and ProductSecundary
in model CompProduct
both use the same relation name. Please provide different relation names for them through `@relation(<name>).'
model Product {
prod_id String @id @default(uuid()) @db.VarChar(100)
description String @db.VarChar(100)
idParceiro String
price Decimal @db.Decimal(10, 2)
status Status @default(active) //se esta ativo ou inativo
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
CompProduct _CompProduct_[]
@@map("product")
}
model CompProduct {
comp_prpduct_id String @id @default(uuid()) @db.VarChar(100)
prod_principle_id String @db.VarChar(100)
prod_comp_id String @db.VarChar(100)
//relacionamento
ProductPrinciple Product @relation("prod_id", _fields_: [prod_principle_id], _references_: [prod_id])
ProductSecundary Product @relation("prod_id", _fields_: [prod_comp_id], _references_: [prod_id])
Product Product? @relation(_fields_: [productProd_id], _references_: [prod_id])
productProd_id String? @db.VarChar(100)
@@map("comp_product")
}Bruno Orosco
06/09/2022, 7:27 PMGelo
06/09/2022, 7:28 PMUsman Sabuwala
06/10/2022, 1:25 AMUsman Sabuwala
06/10/2022, 1:25 AMJeff
06/10/2022, 2:28 AMJeff
06/10/2022, 2:30 AMJeff
06/10/2022, 2:31 AM