Independence Note: Simply modifying generic Prisma middleware or schema fields.
Context:
If a Guild Admin deletes a bounty, we don't want to permanently wipe the database record due to audit trails and on-chain syncing mismatches.
Objective:
Refactor the Bounty entity to utilize "Soft Deletes".
Acceptance Criteria:
Technical Pointers:
- You can use Prisma extensions or explicit query arguments. Avoid Prisma middleware as it is deprecated in Prisma 5.
Independence Note: Simply modifying generic Prisma middleware or schema fields.
Context:
If a Guild Admin deletes a bounty, we don't want to permanently wipe the database record due to audit trails and on-chain syncing mismatches.
Objective:
Refactor the Bounty entity to utilize "Soft Deletes".
Acceptance Criteria:
deletedAtDateTime column (nullable) to the Bounty model inschema.prisma.GET /bountiesendpoints to explicitly filter out any records wheredeletedAtis NOT NULL.DELETE /bounties/:idendpoint to perform anUPDATEsettingdeletedAt = NOW()rather than a destructive Prisma.delete().Technical Pointers: