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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@charmverse/core",
"version": "0.126.0",
"version": "0.126.1-rc-add-indices.0",
"description": "Core API for Charmverse",
"type": "commonjs",
"types": "./dist/cjs/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
-- CreateIndex
CREATE INDEX "Post_createdBy_idx" ON "Post"("createdBy");

-- CreateIndex
CREATE INDEX "Post_proposalId_idx" ON "Post"("proposalId");

-- CreateIndex
CREATE INDEX "Proposal_workflowId_idx" ON "Proposal"("workflowId");

-- CreateIndex
CREATE INDEX "Proposal_projectId_idx" ON "Proposal"("projectId");

-- CreateIndex
CREATE INDEX "Proposal_formId_idx" ON "Proposal"("formId");

-- CreateIndex
CREATE INDEX "Proposal_archived_idx" ON "Proposal"("archived");

-- CreateIndex
CREATE INDEX "Proposal_status_idx" ON "Proposal"("status");

-- CreateIndex
CREATE INDEX "Space_homePageId_idx" ON "Space"("homePageId");

-- CreateIndex
CREATE INDEX "Space_defaultPostCategoryId_idx" ON "Space"("defaultPostCategoryId");

-- CreateIndex
CREATE INDEX "Space_domain_idx" ON "Space"("domain");

-- CreateIndex
CREATE INDEX "Space_customDomain_idx" ON "Space"("customDomain");

-- CreateIndex
CREATE INDEX "Space_name_idx" ON "Space"("name");

-- CreateIndex
CREATE INDEX "UserNotificationMetadata_spaceId_idx" ON "UserNotificationMetadata"("spaceId");

-- CreateIndex
CREATE INDEX "UserNotificationMetadata_createdBy_idx" ON "UserNotificationMetadata"("createdBy");

-- CreateIndex
CREATE INDEX "UserNotificationMetadata_userId_idx" ON "UserNotificationMetadata"("userId");

-- CreateIndex
CREATE INDEX "UserSpaceAction_pageId_idx" ON "UserSpaceAction"("pageId");

-- CreateIndex
CREATE INDEX "UserSpaceAction_postId_idx" ON "UserSpaceAction"("postId");
4 changes: 2 additions & 2 deletions src/prisma/migrations/migration_lock.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "postgresql"
# It should be added in your version-control system (e.g., Git)
provider = "postgresql"
18 changes: 18 additions & 0 deletions src/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,11 @@ model Space {
spaceExportJobs SpaceExportJob[]

@@index([createdBy])
@@index([homePageId])
@@index([defaultPostCategoryId])
@@index([domain])
@@index([customDomain])
@@index([name])
}

enum SpaceExportJobStatus {
Expand Down Expand Up @@ -610,6 +615,8 @@ model UserSpaceAction {

@@index([createdBy, action])
@@index([spaceId, action])
@@index([pageId])
@@index([postId])
}

model PageComment {
Expand Down Expand Up @@ -1406,6 +1413,11 @@ model Proposal {

@@index([spaceId])
@@index([reviewedBy])
@@index([workflowId])
@@index([projectId])
@@index([formId])
@@index([archived])
@@index([status])
}

model ProposalWorkflow {
Expand Down Expand Up @@ -1821,6 +1833,8 @@ model Post {
@@index([path])
@@index([spaceId, deletedAt]) // space feed
@@index([spaceId, deletedAt, categoryId]) // category feed
@@index([createdBy])
@@index([proposalId])
}

model PostToPostTag {
Expand Down Expand Up @@ -2065,6 +2079,10 @@ model UserNotificationMetadata {
proposalNotifications ProposalNotification[]
voteNotifications VoteNotification[]
customNotifications CustomNotification[]

@@index([spaceId])
@@index([createdBy])
@@index([userId])
}

model BountyNotification {
Expand Down