Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rf6 staging #65

Merged
merged 3 commits into from
Nov 10, 2024
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 },
});
}
}