Today, we are issuing the second Beta release: 2.0.0-beta.2
(short: beta.2
).
We want to give a huge shoutout to @Sytten who helped us fix some issues in the Rust codebase 🎊
Major improvements
Parametrized count
queries in Prisma Client
In previous versions of Prisma Client, it was not possible to provide any filter arguments when using .count
. With this release, you can provide the same filter arguments from findMany
:
const numberOfUsersCalledBob = await prisma.user.count({ where: { name: 'Bob' }})
Lots of bug fixes and improvements
With this release, we were able to fix a lot of nasty bugs like some schema validation issues in VS Code (#1989 and #1970) as well as a Prisma Migrate bug with 1-n self-relations.
Fixes and improvements per Prisma 2.0 repository
prisma
- Provide log output when
.env
file is used - Closes #1155 - Add MariaDB integration tests closes #1791
- Fix "because" typo in README
- Add a --json flag to
version
command - Running prisma version fails
- Schemas with incomplete @relation annotations should be rejected during Client generation
- Fix
prisma2 generate --watch
exits when no models are defined in schema.prisma - Fix link to Prisma documentation
- fix typo in README
- Fix "Getting started" links
- Prisma generate script throws error
- Running a built binary fails with weird error
- Validation error message for schema with missing relation scalar field (old syntax)
- Validation Error: error: Error validating: The relation field
Teams
uses the scalar fields tmID. The arity of those fields must be the same. The relation field is required but the scalar fields are optional. - Add integration test for introspection warnings
- Error format for enum field declaration broken
- Error format for missing type on field is broken
- Error when disconnecting m:n relation with string-id-model
- Getting error on deeper includes
- ENV-based binary variables broken on preview022
- Proposal: Rename prisma binary to query-engine
prisma2 generate --watch
exits when no models are defined in schema.prisma- Provide log output when
.env
file is used
prisma-client-js
- adjust README
- Fix a typo in the generated docs
- Error message "Error: Query engine binary for current platform "..." could not be found" could list other file from that directory to help debugging
- Fix batching. Closes #562
- Invalid include query results in unexpected output
- Query batching sends queries with different selection set
- Super long output on error in
create
prisma-engines
- Adapt test-cli to new query engine binary name
- Unify duplicated test assertion code paths
- Remove Unused Dependencies
- Upgrade quaint and adjust tests after mysql floats fix
- Fix Self Relation Rendering
- Minor opportunistic simplifications in sql schema calculator
- Fix detection of 1:1 relations for self-relations
- Datamodel parser/relation arguments validation
- Downgrade tokio to 0.2.13
- Fix for unexpected additional records during deeply nested reads.
- Bug: subquery has too many columns
- Update crates (incl. faster tokio)
- cargo fmt
- adapt arity validation for relation fields to match introspection logic
- Datamodel Parser: allow dbgenerated function for enum fields
- add readonly flag to dmmf field
- Drop relations that are referring to unsupported types
- Add dmmf subcommand to test-cli
- Ignore env errors when reformatting
- Test column types with dubious nullability properties (pg/mysql)
- improve relation validations
- prisma-fmt formatting regression
- Add support for newline in the source and generator blocks
- Investigate weirdness around nullability of timestamp fields
- Proposal: Tighten datamodel parser rules for @relation
- Reenable error code and message assertions in scala tests