You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the connection's unique constraint on 'type' might be missing a userId condition.
Issue:
Adding multiple connections of the same type fails, even if userId is different. For example: adding 2 discord connections from 2 different users causes unique constraint failure ( even when discord accounts and user accounts are different).
Possible fix:
Fixed on my side by adding userId condition to the unique constraint on type:
Old Connections schema:
model Connections {
id String @id @default(uuid())
type String @unique
// rest of the file
}
changed Connections schema:
model Connections {
id String @id @default(uuid())
type String
// rest of the file
@@unique([userId, type])
}
The text was updated successfully, but these errors were encountered:
I think the connection's unique constraint on 'type' might be missing a userId condition.
Issue:
Adding multiple connections of the same type fails, even if userId is different. For example: adding 2 discord connections from 2 different users causes unique constraint failure ( even when discord accounts and user accounts are different).
Possible fix:
Fixed on my side by adding userId condition to the unique constraint on type:
Old Connections schema:
changed Connections schema:
The text was updated successfully, but these errors were encountered: