sdy

make name became unique field

...@@ -27,7 +27,7 @@ model User { ...@@ -27,7 +27,7 @@ model User {
27 27
28 model Room { 28 model Room {
29 id Int @default(autoincrement()) @id 29 id Int @default(autoincrement()) @id
30 - name String 30 + name String @unique
31 participants User[] @relation(references: [id]) 31 participants User[] @relation(references: [id])
32 categories Category[] 32 categories Category[]
33 messages Message[] 33 messages Message[]
...@@ -51,4 +51,4 @@ model Message { ...@@ -51,4 +51,4 @@ model Message {
51 createdAt DateTime? @default(now()) 51 createdAt DateTime? @default(now())
52 category Category? @relation(fields: [categoryId], references: [id]) 52 category Category? @relation(fields: [categoryId], references: [id])
53 categoryId Int? 53 categoryId Int?
54 -}
...\ No newline at end of file ...\ No newline at end of file
54 +}
......