Nischal
05/02/2020, 11:28 AM[ Error: Invalid `prisma.advertiser.create()` invocation:
The change you are trying to make would violate the required relation 'AdvertiserToUser' between the `Advertiser` and `User` models.
Ryan
05/04/2020, 9:29 AMmodel User {
id Int @default(autoincrement()) @id
email String? @unique
fullName String?
password String?
userRole String?
advertise Advertiser?
}
model Advertiser {
id Int @default(autoincrement()) @id
companyContactNumber String?
companyName String?
location String?
registeredNumber Int?
verified Boolean?
userId Int
createdBy User @relation(fields: [userId], references: [id])
}
Nischal
05/04/2020, 9:33 AMNischal
05/04/2020, 9:34 AMNischal
05/04/2020, 9:34 AM