Tarna
Tarna
Explore posts from servers
PPrisma
Created by Tarna on 7/1/2024 in #help-and-questions
Unique Constraints Failed
well no currently documents for server currently exist so not sure where it got that from
11 replies
PPrisma
Created by Tarna on 7/1/2024 in #help-and-questions
Unique Constraints Failed
tho I don't see that field when I view the database through mongo cloud
11 replies
PPrisma
Created by Tarna on 7/1/2024 in #help-and-questions
Unique Constraints Failed
im using mongo so it doesnt seem to support it. but I did it with --force and it shows a field named secret with the type Json?
11 replies
PPrisma
Created by Tarna on 7/1/2024 in #help-and-questions
Unique Constraints Failed
I legit removed all @unique and it still is saying unique constraints failed
11 replies
PPrisma
Created by Tarna on 7/1/2024 in #help-and-questions
Unique Constraints Failed
I still haven't been able to figure out this issue
11 replies
PPrisma
Created by Tarna on 7/1/2024 in #help-and-questions
Unique Constraints Failed
model Server {
id String @id @default(cuid()) @map("_id")
token String @unique
name String @unique
ip String
port Int
motd String @default("A Minecraft Server")

icon String @default("OAK_SIGN")
categories String[] @default([])
suspended Boolean @default(false)
joins Int @default(0)

owner Player? @relation(fields: [ownerId], references: [id])
ownerId String?

createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Server {
id String @id @default(cuid()) @map("_id")
token String @unique
name String @unique
ip String
port Int
motd String @default("A Minecraft Server")

icon String @default("OAK_SIGN")
categories String[] @default([])
suspended Boolean @default(false)
joins Int @default(0)

owner Player? @relation(fields: [ownerId], references: [id])
ownerId String?

createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
the model looks like this. it is using mongodb as the provider.
11 replies
PPrisma
Created by Tarna on 7/1/2024 in #help-and-questions
Unique Constraints Failed
same thing happens. the only 2 values that I have on that model that are marked as unique are token and name.
11 replies