-
Notifications
You must be signed in to change notification settings - Fork 0
fix(email): unbreak tenant template writes, vanishing Save header, preview images #264
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: AutomatosAI/budstack-saas
Length of output: 50381
🏁 Script executed:
Repository: AutomatosAI/budstack-saas
Length of output: 50382
🏁 Script executed:
Repository: AutomatosAI/budstack-saas
Length of output: 787
🏁 Script executed:
Repository: AutomatosAI/budstack-saas
Length of output: 50381
🌐 Web query:
Prisma 6.7.0 upsert WhereUniqueInput compound unique additional non-unique fields extendedWhereUnique💡 Result:
In Prisma 6.7.0, the extendedWhereUnique feature is no longer a Preview feature; it has been promoted to General Availability [1]. This functionality was originally introduced in version 4.5.0 [2] to allow developers to include additional non-unique fields in the where filter of queries that target unique records—such as findUnique, update, delete, and upsert—provided that at least one unique field is also specified [3][2]. Key details regarding your query: Compound Unique Constraints: You can use compound IDs or compound unique constraints within the where filter of an upsert operation [4][5]. When using these, you must provide the values for all fields that make up the unique constraint [4][5]. ExtendedWhereUnique: Because this feature is now part of the stable Prisma Client API, you do not need to enable any preview feature flags in your schema.prisma file to use it [1]. By allowing non-unique fields alongside unique fields in the where clause, it enables more precise targeting for operations like upsert [2]. For example, if you have a model with a unique id, you can perform an upsert using both that id and an additional non-unique status field: await prisma.user.upsert({ where: { id: 1, status: 'ACTIVE' // This non-unique field is now supported }, update: { name: 'New Name' }, create: { id: 1, name: 'New Name', status: 'ACTIVE' } }); Ensure that the fields used to identify the record in the where clause are defined as part of a
@uniqueor@idconstraint in your schema; otherwise, Prisma will raise a validation error because it cannot guarantee a single unique record match [6][7].Citations:
🏁 Script executed:
Repository: AutomatosAI/budstack-saas
Length of output: 787
🏁 Script executed:
Repository: AutomatosAI/budstack-saas
Length of output: 442
Scope
upsert.wherewith the bound tenant.upsertonly stampscreate, so a unique match from another tenant can enter the update branch. ApplyapplyTenantWriteScopetoupsert.whereafter injection. Keep the unique selector at the top level. Add an extension-level regression test for the matching update branch.🤖 Prompt for AI Agents