Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
feat(schema): add dataroom brand
Marc Seitz13340f64038c
diff --git a/prisma/migrations/20240401000000_add_dataroom_brand/migration.sql b/prisma/migrations/20240401000000_add_dataroom_brand/migration.sqlnew file mode 100644index 00000000..7f66ba9f--- /dev/null+++ b/prisma/migrations/20240401000000_add_dataroom_brand/migration.sql@@ -0,0 +1,20 @@+-- CreateTable+CREATE TABLE "DataroomBrand" (+ "id" TEXT NOT NULL,+ "logo" TEXT,+ "banner" TEXT,+ "brandColor" TEXT,+ "accentColor" TEXT,+ "dataroomId" TEXT NOT NULL,+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,+ "updatedAt" TIMESTAMP(3) NOT NULL,++ CONSTRAINT "DataroomBrand_pkey" PRIMARY KEY ("id")+);++-- CreateIndex+CREATE UNIQUE INDEX "DataroomBrand_dataroomId_key" ON "DataroomBrand"("dataroomId");++-- AddForeignKey+ALTER TABLE "DataroomBrand" ADD CONSTRAINT "DataroomBrand_dataroomId_fkey" FOREIGN KEY ("dataroomId") REFERENCES "Dataroom"("id") ON DELETE CASCADE ON UPDATE CASCADE;+diff --git a/prisma/schema.prisma b/prisma/schema.prismaindex 3c6136da..bb411fb4 100644--- a/prisma/schema.prisma+++ b/prisma/schema.prisma@@ -358,6 +358,7 @@ model Dataroom {folders DataroomFolder[]links Link[]views View[]+ brand DataroomBrand?createdAt DateTime @default(now())updatedAt DateTime @updatedAt@@ -398,3 +399,16 @@ model DataroomFolder {@@unique([dataroomId, path])@@index([parentId])}++model DataroomBrand {+ id String @id @default(cuid())+ logo String? // This should be a reference to where the file is stored (S3, Google Cloud Storage, etc.)+ banner String? // This should be a reference to where the file is stored (S3, Google Cloud Storage, etc.)+ brandColor String? // This should be a reference to the brand color+ accentColor String? // This should be a reference to the accent color+ dataroomId String @unique+ dataroom Dataroom @relation(fields: [dataroomId], references: [id], onDelete: Cascade)++ createdAt DateTime @default(now())+ updatedAt DateTime @updatedAt+}