From f4afb0e4a6daa0c1d5fb1bea29b335bb0fcf4e39 Mon Sep 17 00:00:00 2001 From: tedspare Date: Thu, 6 Oct 2022 20:18:10 -0400 Subject: [PATCH] Impose uniqueness constraint on user + team + repo --- prisma/schema.prisma | 1 + 1 file changed, 1 insertion(+) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index b1aedb5..ff0b15e 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -75,5 +75,6 @@ model Sync { linearApiKey String linearApiKeyIV String + @@unique([githubUserId, linearUserId, githubRepoId, linearTeamId]) @@map("syncs") }