diff --git a/prisma/migrations/20230130074516_unique_language_name/migration.sql b/prisma/migrations/20230130074516_unique_language_name/migration.sql new file mode 100644 index 0000000..af81b04 --- /dev/null +++ b/prisma/migrations/20230130074516_unique_language_name/migration.sql @@ -0,0 +1,8 @@ +/* + Warnings: + + - A unique constraint covering the columns `[name]` on the table `Language` will be added. If there are existing duplicate values, this will fail. + +*/ +-- CreateIndex +CREATE UNIQUE INDEX `Language_name_key` ON `Language`(`name`); diff --git a/prisma/schema.prisma b/prisma/schema.prisma index fc5eb95..1356a86 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -45,7 +45,7 @@ model Category { model Language { id Int @id @default(autoincrement()) - name String + name String @unique Snippet Snippet[] }