Skip to content

Commit

Permalink
Builder card activity schema (#379)
Browse files Browse the repository at this point in the history
* Builder card activity schema

* ci: version bump to 0.89.3-rc-feat-builder-ac.0

* add unique to builder

* ci: version bump to 0.89.4-rc-feat-builder-ac.0

---------

Co-authored-by: Automated Version Bump <[email protected]>
Co-authored-by: mattcasey <[email protected]>
  • Loading branch information
3 people authored Oct 25, 2024
1 parent d6392cb commit 67909f1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
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.89.3",
"version": "0.89.4-rc-feat-builder-ac.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,13 @@
-- CreateTable
CREATE TABLE "BuilderCardActivity" (
"builderId" UUID NOT NULL,
"last7Days" JSONB NOT NULL,

CONSTRAINT "BuilderCardActivity_pkey" PRIMARY KEY ("builderId")
);

-- CreateIndex
CREATE UNIQUE INDEX "BuilderCardActivity_builderId_key" ON "BuilderCardActivity"("builderId");

-- AddForeignKey
ALTER TABLE "BuilderCardActivity" ADD CONSTRAINT "BuilderCardActivity_builderId_fkey" FOREIGN KEY ("builderId") REFERENCES "Scout"("id") ON DELETE CASCADE ON UPDATE CASCADE;
9 changes: 9 additions & 0 deletions src/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -2817,6 +2817,7 @@ model Scout {
builderNfts BuilderNft[]
activities ScoutGameActivity[]
PendingNftTransaction PendingNftTransaction[]
builderCardActivities BuilderCardActivity[]
@@index([username])
@@index([farcasterId])
Expand Down Expand Up @@ -3157,3 +3158,11 @@ model ProposalMyWorkColumn {
@@unique([spaceId, formFieldId])
}

model BuilderCardActivity {
builderId String @id @db.Uuid
builder Scout @relation(fields: [builderId], references: [id], onDelete: Cascade)
last7Days Json
@@unique([builderId])
}

0 comments on commit 67909f1

Please sign in to comment.