Today, we are excited to share the 2.10.0
stable release π
π Help us spread the word about Prisma by starring the repo βοΈ or tweeting about the release.
Major improvements
This release introduces some major new features in Preview!
Support for Microsoft SQL Server (Preview)
With this release, we're introducing support for a new database: Microsoft SQL Server π₯³
You can start using your MS SQL Server databases today with introspection and query them with Prisma Client. Note that Prisma Migrate does not support MS SQL Server yet.
An MS SQL Server database is specified in your Prisma schema via the new sqlserver
connector. Note that while it's in Preview, you also need to add the additional previewFeature
flag microsoftSqlServer
in the generator for Prisma Client:
datasource db {
provider = "sqlserver"
}
generator client {
provider = "prisma-client-js"
previewFeatures = ["microsoftSqlServer"]
}
You can find a ready-to-run example based on MS SQL Server here.
Please share your feedback on how this feature works for you. We are interested in both positive and negative feedback, so we know whether this feature is already ready for production! (If you encounter any problems, please open a new issue here).
π Documentation: Microsoft SQL Server connector
Single-command schema changes for prototyping (Preview)
With this release, we are introducing a new command that lets you push the state of your Prisma schema file to the database without using migrations: prisma db push --preview-feature
push
is the first command that's introduced under the new prisma db
namespace. The prisma db
namespace will be used for commands that operate directly against the database without e.g., saving or manipulating a migration history on your file system nor in the migrations table. It's therefore well-suited for prototyping and local development environments. In production environments, you'll want to be able to track and replay the changes made to your database which will be handled by the prisma migrate
namespace.
The idea behind prisma db push
is that you only care about the end state of your database schema, but not about how this end state is achieved.
Also note that the command runs prisma generate
for you, so you're saving an extra step after having updated your Prisma schema!
Please share your feedback on how this feature works for you. We are interested in both positive and negative feedback, so we know whether this feature is already ready for production! (If you encounter any problems, please open a new issue here).
π Documentation: db push
command
Atomic number operations are now stable
In 2.6.0
we introduced case atomic number operations in Preview, in today's release we're promoting this feature to stable. This means you don't need to include the atomicNumberOperations
feature flag in the Prisma Client generator any more:
generator client {
provider = "prisma-client-js"
- previewFeatures = ["atomicNumberOperations"]
}
π Documentation: Atomic operations on update
Already existing preview features from previous releases
Just a quick reminder:
- In version
2.1.0
we introduced two preview features, namelyconnectOrCreate
andtransactionApi
.
In case they're useful for you, please give them a try and share your feedback! These features remain in preview in this release.
π Join the first Prisma Meetup online
We are excited to bring you the first Prisma Meetup which is going to happen entirely online, so you can dial in from around the globe!
It will be streamed on Youtube this Thursday: October 29th, 2020 at 6pm (CET, Berlin) | 10am (PDT, San Francisco)
We have amazing speakers on board for our first Meetup:
β Tammy Butow (Principal SRE @ Gremlin): Database Horror Stories
β HervΓ© Labas (VP of Product @ Prisma): The future of Prisma and its roadmap
β Tom Hutchinson (Head of Mobile @ Rapha): Prisma at Rapha
You can watch the event on YouTube here.
Fixes and improvements
prisma
- Graceful shutdown
- Use
.executeRaw()
with.transaction([])
- Report the database version in the migrate/introspection error reports
- connectOrCreate fails during upsert
- $connect doesn't actually connect, the first query does
- Log when a connection to the database is opened
- Allow .env in the project root with the Prisma Schema somewhere else
- process.on('SIGINT') callback not being called when I import @prisma/client
- Send sql schema description with the introspection error reports
- Feature request: Allow
$queryRaw
and$executeRaw
in transactions - Support SQL Server in
executeRaw
andqueryRaw
- Introduce stand-alone integration test package
- Separate test helpers into separate folder structure
- Stabilize
atomicNumberOperations
- Introduce
@prisma/engines
package - Integration tests with SQL Server
- undefined is printed at the top of @prisma/cli@dev
prisma-client-js
- ISO Dates with an offset is not working
- PANIC: called
Result::unwrap()
on anErr
value: Error("EOF while parsing a value", line: 1, column: 0)
migrate
- [PostgreSQL] migrating column from jsonb[] to jsonb fails
- Migration fails when attempting to change the column type in the absence of a working cast
- Error: Error in migration engine. Reason: [libs\sql-schema-describer\src\postgres.rs:159:20] querying for columns: Error { kind: QueryError(Error { kind: Closed, cause: None }), original_code: None, original_message: Some("connection closed") }
language-tools
- Warn about provider array deprecation in the VSCode plugin
- prisma-language-server cannot be ran as command
- LSP: Can't rename if the server getting position that is not the end of word.
- LSP: Please do best effort when the lsp-client doesn't support context option.
- Json should also show squiggly lines for MSSQL
studio
- Studio enforces optional fields to be filled
- Reordering a column also sorts by that column
- Studio swallows all feature flags inside the
generator
block
prisma-engines
- Query Engine: Native Types
- Introspection Engine: Native Types
- Native Types: Add support for non integer arguments
- Proper parsing of JDBC connection strings
- Composite key ordering in SQL Server
- Do not use magic partial indices with SQL Server
- Gate SQL Server from Migration Engine
- Validator should disallow native type Text in combination with unique attribute for MySQL
- Remove duplication in Introspection Engine tests
- Move all preview feature flags into the generator block
- Research: Understand compatibility of native types with PSL features
- remove validation for optional 1:1 relations in MSSQL
- Remove ScalarType
Xml
- Implement default mapping for new scalar type
Decimal
- Implement default mapping for the scalar types
Bytes