Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
-- CreateTable
CREATE TABLE "CommunityMetadata" (
"id" TEXT NOT NULL,
"communityId" TEXT NOT NULL,
"communityName" TEXT NOT NULL,
"description" TEXT,
"image" TEXT,
"subdomains" TEXT[],
"groupIds" TEXT[],
"authorizedGroupIds" TEXT[],
"terms" INTEGER[],
"hidden" BOOLEAN NOT NULL DEFAULT false,
"hideSearch" BOOLEAN NOT NULL DEFAULT false,
"hideFilter" BOOLEAN NOT NULL DEFAULT false,
"chevronOverAvatar" BOOLEAN NOT NULL DEFAULT false,
"footerText" TEXT,
"leaderboardApiUrl" TEXT,
"newsFeed" TEXT,
"challengeFilter" JSONB,
"challengeListing" JSONB,
"menuItems" JSONB NOT NULL,
"logos" JSONB NOT NULL,
"additionalLogos" TEXT[],
"accessDeniedPage" JSONB,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "CommunityMetadata_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "CommunityMetadata_communityId_key" ON "CommunityMetadata"("communityId");

-- CreateIndex
CREATE INDEX "CommunityMetadata_communityId_idx" ON "CommunityMetadata"("communityId");

-- CreateIndex
CREATE INDEX "CommunityMetadata_hidden_idx" ON "CommunityMetadata"("hidden");

-- CreateIndex
CREATE INDEX "CommunityMetadata_subdomains_idx" ON "CommunityMetadata"("subdomains");

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "CommunityMetadata"
ADD COLUMN "metadata" JSONB;
32 changes: 32 additions & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,35 @@ model User {

@@index([universalUID])
}

model CommunityMetadata {
id String @id @default(uuid())
communityId String @unique
communityName String
description String?
image String?
subdomains String[]
groupIds String[]
authorizedGroupIds String[]
terms Int[]
hidden Boolean @default(false)
hideSearch Boolean @default(false)
hideFilter Boolean @default(false)
chevronOverAvatar Boolean @default(false)
footerText String?
leaderboardApiUrl String?
newsFeed String?
challengeFilter Json?
challengeListing Json?
metadata Json?
menuItems Json
logos Json
additionalLogos String[]
accessDeniedPage Json?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt

@@index([communityId])
@@index([hidden])
@@index([subdomains])
}
Loading
Loading