šĀ Help us spread the word about Prisma by starring the repoĀ āļøĀ orĀ tweetingĀ about the release. š
Major improvements
Filter for non-unique properties in unique where queries (Preview)
In this release, we are adding support for non-unique properties inside the where statement for queries that operate on a unique record (e.g.: findUnique, update, delete, etc.). This was not possible in the past, as we only allowed unique fields as filters inside the where statement for the queries in question.
There are use cases where a query that operates on a unique record requires further filtering by non-unique properties. For example, for the following model:
model Article {
id Int @id @default(autoincrement())
content String
version Int
}
Letās say that you would like to update the Article with an id of ā5ā, but only if the version equals "1":
await prisma.article.update({
where: { id: 5, version: 1 }, // `version` field was not available before Prisma 4.5.0
data: {
content: "Incredible new story",
version: { increment: 1 },
},
});
With 4.5.0, we are adding support to specify any number of non-unique fields in your where statement, as long as you have at least one unique field.
To learn more about this feature and about use cases where it can be useful, please check out our documentation. For feedback, please leave a comment on the GitHub issue.
PostgreSQL extension management (Preview)
We are excited to add support for declaring PostgreSQL extensions in the Prisma schema. The feature comes with support for introspection and migrations. This will allow you to adopt, evolve and manage whichĀ PostgreSQL database extensions are installed directly from within your Prisma schema.
... (truncated)
Commits
f7bb466 chore(deps): update studio to 0.476.0 (#15858)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps prisma from 3.15.2 to 4.5.0.
Release notes
Sourced from prisma's releases.
... (truncated)
Commits
f7bb466
chore(deps): update studio to 0.476.0 (#15858)187470c
fix(cli): deno + dataproxy message (#15847)1343c82
feat(client): preview feature deno (#15281)f2de612
chore(deps): update devdependencies (non-major) (#15752)1e93ac5
chore(deps): update devdependencies (non-major)9f9e109
chore(deps): update studio to v0.475.0 (#15656)52f95cb
chore: fix spelling (#15645)e060593
chore(deps): update dependency fs-jetpack to v5 (#15344)7d444fa
chore(deps): update devdependencies (non-major)4a1d4d5
chore(deps): update devdependencies (non-major)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)