Skip to content

Commit

Permalink
SG - New place for wallet addresses (#380)
Browse files Browse the repository at this point in the history
* SG - New place for wallet addresses

* ci: version bump to 0.90.1-rc-feat-sg-wallet.0

* Remove Id and add index

* ci: version bump to 0.90.1-rc-feat-sg-wallet.1

* ci: version bump to 0.91.1-rc-feat-sg-wallet.0

* Add scout id index

* ci: version bump to 0.91.1-rc-feat-sg-wallet.1

---------

Co-authored-by: Automated Version Bump <[email protected]>
  • Loading branch information
valentinludu and Automated Version Bump authored Oct 30, 2024
1 parent 0974459 commit a49eb7f
Show file tree
Hide file tree
Showing 3 changed files with 30 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.91.0",
"version": "0.91.1-rc-feat-sg-wallet.1",
"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,18 @@
-- CreateTable
CREATE TABLE "ScoutWallet" (
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"address" TEXT NOT NULL,
"scoutId" UUID NOT NULL
);

-- CreateIndex
CREATE UNIQUE INDEX "ScoutWallet_address_key" ON "ScoutWallet"("address");

-- CreateIndex
CREATE INDEX "ScoutWallet_address_idx" ON "ScoutWallet"("address");

-- CreateIndex
CREATE INDEX "ScoutWallet_scoutId_idx" ON "ScoutWallet"("scoutId");

-- AddForeignKey
ALTER TABLE "ScoutWallet" ADD CONSTRAINT "ScoutWallet_scoutId_fkey" FOREIGN KEY ("scoutId") REFERENCES "Scout"("id") ON DELETE CASCADE ON UPDATE CASCADE;
11 changes: 11 additions & 0 deletions src/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -2805,6 +2805,7 @@ model Scout {
agreedToTermsAt DateTime?
onboardedAt DateTime?
currentBalance Int @default(0)
scoutWallet ScoutWallet[]
strikes BuilderStrike[]
events BuilderEvent[]
githubUser GithubUser[]
Expand Down Expand Up @@ -3167,3 +3168,13 @@ model BuilderCardActivity {
@@unique([builderId])
}

model ScoutWallet {
createdAt DateTime @default(now())
address String @unique
scoutId String @db.Uuid
scout Scout @relation(fields: [scoutId], references: [id], onDelete: Cascade)
@@index([address])
@@index([scoutId])
}

0 comments on commit a49eb7f

Please sign in to comment.