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

Added transaction to creating an SES setting & upgraded to Prisma ORM 6 #109

Merged
merged 2 commits into from
Mar 8, 2025

Conversation

arxkdev
Copy link
Contributor

@arxkdev arxkdev commented Feb 18, 2025

This PR fixes/adds the following:

  • Adds a transaction for creating an SES setting: When creating an SES setting initially, if an error occurs, the entry is still added into the database which causes conflicts when trying again. Currently the workaround is that you just flush the SesSetting table but this is obviously not ideal. There's quite a few things happening when creating an SES setting so I made sure everything runs and if one fails, it rolls back and errors.
  • Upgrades Prisma to v6: V6 includes a lot of changes and some breaking changes (none which affect Unsend), Unsend was running on Prisma v5.11.0 which was released nearly a year ago. There has been significant performance upgrades since then and optimizations for things like raw SQL queries.
  • Removes @prisma/extension-optimize: No need for it. I was advised to just remove it as it was causing issues with Prisma typing and had no real use for Unsend.

If I missed anything, let me know. The reviewer will likely need to make sure that the Prisma migration is 100% good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to specify tracing anymore, it's now fully added to Prisma.

@KMKoushik KMKoushik changed the base branch from main to v1.4 March 8, 2025 06:28
Copy link
Member

@KMKoushik KMKoushik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is awesome. tysm

@KMKoushik KMKoushik merged commit 9c3bd44 into unsend-dev:v1.4 Mar 8, 2025
1 check passed
KMKoushik pushed a commit that referenced this pull request Mar 8, 2025
… 6 (#109)

* Added transaction to creating SES setting & upgraded Prisma to Prisma ORM 6

* Keep logging of the queue status in

---------

Co-authored-by: Kumarion <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants