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: 2 additions & 0 deletions prisma/migrations/20241031160035_/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "User" ALTER COLUMN "budget" SET DEFAULT 1100000;
2 changes: 1 addition & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ generator client {

model User {
id Int @id @default(autoincrement())
budget Int @default(2000000) // 2M In OP
budget Int @default(1100000) // 1.1M In OP
address String @unique()
smartaddress String? @unique()
ballotSuccess Int? @map("ballot_success")
Expand Down
24 changes: 24 additions & 0 deletions src/flow/flow.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1277,5 +1277,29 @@ export class FlowController {
await this.prismaService.projectCoI.deleteMany({
where: { userId: userId },
});
await this.prismaService.budgetDelegation.findUnique({
where: { userId: userId },
});
await this.prismaService.collectionDelegation.deleteMany({
where: { userId: userId },
});
await this.prismaService.farcasterConnection.deleteMany({
where: { userId: userId },
});
await this.prismaService.share.deleteMany({
where: { userId: userId },
});
await this.prismaService.userAttestation.deleteMany({
where: { userId: userId },
});
await this.prismaService.userBudgetAttestation.deleteMany({
where: { userId: userId },
});
await this.prismaService.userCollectionFinish.deleteMany({
where: { userId: userId },
});
await this.prismaService.user.deleteMany({
where: { id: userId },
});
}
}