From d7abadf6a6335b3fc1ea225a19bd995f1530c11e Mon Sep 17 00:00:00 2001 From: Spacelord Date: Tue, 16 May 2023 00:03:05 +0200 Subject: [PATCH] Added stroageUnit to contactType enum in db Schema - contactInfo in StorageUnit is not optional anymore. --- prisma/schema.prisma | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 09109a1..d89dff5 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -67,10 +67,10 @@ model StorageLocation { /// A StorageUnit is the base and can hold multiple StorageLocations. model StorageUnit { id Int @id @default(autoincrement()) - name String + name String @unique - contactInfo contactInfo? @relation(fields: [contactInfoId], references: [id]) - contactInfoId Int? + contactInfo contactInfo @relation(fields: [contactInfoId], references: [id]) + contactInfoId Int StorageLocation StorageLocation[] } @@ -98,6 +98,7 @@ model contactInfo { } enum contactType { + storageUnit person customer company