wip
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "public"."groups" (
|
||||
"id" TEXT NOT NULL DEFAULT '',
|
||||
"projectId" TEXT NOT NULL,
|
||||
"type" TEXT NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
"properties" JSONB NOT NULL DEFAULT '{}',
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "groups_pkey" PRIMARY KEY ("projectId","id")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "public"."groups" ADD CONSTRAINT "groups_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "public"."projects"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@@ -199,8 +199,6 @@ model Project {
|
||||
meta EventMeta[]
|
||||
references Reference[]
|
||||
access ProjectAccess[]
|
||||
groups Group[]
|
||||
|
||||
notificationRules NotificationRule[]
|
||||
notifications Notification[]
|
||||
imports Import[]
|
||||
@@ -216,19 +214,6 @@ model Project {
|
||||
@@map("projects")
|
||||
}
|
||||
|
||||
model Group {
|
||||
id String @default("")
|
||||
projectId String
|
||||
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)
|
||||
type String
|
||||
name String
|
||||
properties Json @default("{}")
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @default(now()) @updatedAt
|
||||
|
||||
@@id([projectId, id])
|
||||
@@map("groups")
|
||||
}
|
||||
|
||||
enum AccessLevel {
|
||||
read
|
||||
|
||||
Reference in New Issue
Block a user