Skip to content

fix(backend): wrap card updates in a transaction to prevent data loss#292

Open
anshul23102 wants to merge 1 commit into
Dev-Card:mainfrom
anshul23102:fix/216-card-link-transaction
Open

fix(backend): wrap card updates in a transaction to prevent data loss#292
anshul23102 wants to merge 1 commit into
Dev-Card:mainfrom
anshul23102:fix/216-card-link-transaction

Conversation

@anshul23102
Copy link
Copy Markdown
Contributor

Closes #216

@Harxhit Harxhit added the gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. label May 23, 2026
@Prince2301p
Copy link
Copy Markdown

Hi,
I would like to work on resolving this issue. Please assign it to me. I’m a participant in GSSoC 2026 and would be happy to contribute.
Looking forward to collaborating with you.

@anshul23102
Copy link
Copy Markdown
Contributor Author

Hi @Dev-Card team, just following up on this one. The issue it addresses is a silent data loss scenario: if any step in the card link update fails midway, partial writes get committed and the card ends up in an inconsistent state with no way to know which links were saved and which were not. Wrapping the whole operation in a Prisma transaction ensures it either fully succeeds or fully rolls back. All existing tests pass. Let me know if you would like any changes.

@anshul23102 anshul23102 force-pushed the fix/216-card-link-transaction branch from e7d8ace to bd33ad1 Compare May 24, 2026 13:21
@anshul23102
Copy link
Copy Markdown
Contributor Author

Hi @PrashantkumarKhatri! The Vercel check is showing 'Authorization required to deploy' on this one too - could you authorize the preview deployment when you get a chance? Ready for review whenever you are. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Missing Database Transaction in Card Link Update leads to Permanent Data Loss

3 participants