Update proclamation category naming constraints.
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- A unique constraint covering the columns `[parentId,name]` on the table `ProclamationCategory` will be added. If there are existing duplicate values, this will fail.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- DropIndex
|
||||||
|
DROP INDEX "ProclamationCategory_name_key";
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE UNIQUE INDEX "ProclamationCategory_parentId_name_key" ON "ProclamationCategory"("parentId", "name");
|
||||||
@@ -129,11 +129,13 @@ model SolfeggioFrequency {
|
|||||||
|
|
||||||
model ProclamationCategory {
|
model ProclamationCategory {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
name String @unique
|
name String
|
||||||
parentId Int?
|
parentId Int?
|
||||||
parent ProclamationCategory? @relation("CategoryHierarchy", fields: [parentId], references: [id])
|
parent ProclamationCategory? @relation("CategoryHierarchy", fields: [parentId], references: [id])
|
||||||
children ProclamationCategory[] @relation("CategoryHierarchy")
|
children ProclamationCategory[] @relation("CategoryHierarchy")
|
||||||
proclamations Proclamation[]
|
proclamations Proclamation[]
|
||||||
|
|
||||||
|
@@unique([parentId, name])
|
||||||
}
|
}
|
||||||
|
|
||||||
model LicenseKey {
|
model LicenseKey {
|
||||||
|
|||||||
Reference in New Issue
Block a user