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](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20Prisma%20release%202.10.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/2.10.0) 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:
prisma
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](https://github.com/prisma/prisma-examples/tree/latest/databases/sql-server).
Please [share your feedback](https://github.com/prisma/prisma/issues/4039) 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](https://github.com/prisma/prisma/issues/new/choose)).
π **Documentation**: [Microsoft SQL Server connector](https://www.prisma.io/docs/reference/tools-and-interfaces/preview-features/sql-server)
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](https://github.com/prisma/prisma/issues/4058) 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](https://github.com/prisma/prisma/issues/new/choose)).
π **Documentation**: [`db push` command](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-cli/command-reference#db-push)
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:
diff
generator client {
provider = "prisma-client-js"
- previewFeatures = ["atomicNumberOperations"]
}
π **Documentation**: [Atomic operations on `update`](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/crud/#atomic-operations-on-update)
Already existing preview features from previous releases
Just a quick reminder:
- In version [`2.1.0`](https://github.com/prisma/prisma/releases/tag/2.1.0) we introduced two preview features, namely `connectOrCreate` and `transactionApi`.
In case they're useful for you, please give them a try and [share your feedback](https://github.com/prisma/prisma/issues/3108)! These features remain in preview in this release.
π Join the first Prisma Meetup online
We are excited to bring you the first [**Prisma Meetup**](https://www.youtube.com/watch?v=SepT_whwFsA) 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](https://tammybutow.com/) (Principal SRE [Gremlin](https://www.gremlin.com/customers/)): Database Horror Stories
β [HervΓ© Labas](https://twitter.com/hervelabas) (VP of Product [Prisma](https://www.prisma.io)): The future of Prisma and its roadmap
β [Tom Hutchinson](https://twitter.com/tomhut) (Head of Mobile [Rapha](https://www.rapha.cc/eu/en/)): Prisma at Rapha
You can watch the event on YouTube [here](https://www.youtube.com/watch?v=SepT_whwFsA).
Fixes and improvements
[`prisma`](https://github.com/prisma/prisma)
- [Graceful shutdown](https://github.com/prisma/prisma/issues/2917)
- [Use `.executeRaw()` with `.transaction([])`](https://github.com/prisma/prisma/issues/3150)
- [Report the database version in the migrate/introspection error reports](https://github.com/prisma/prisma/issues/3486)
- [connectOrCreate fails during upsert](https://github.com/prisma/prisma/issues/3612)
- [$connect doesn't actually connect, the first query does](https://github.com/prisma/prisma/issues/3649)
- [Log when a connection to the database is opened](https://github.com/prisma/prisma/issues/3702)
- [Allow .env in the project root with the Prisma Schema somewhere else](https://github.com/prisma/prisma/issues/3720)
- [process.on('SIGINT') callback not being called when I import prisma/client](https://github.com/prisma/prisma/issues/3773)
- [Send sql schema description with the introspection error reports](https://github.com/prisma/prisma/issues/3779)
- [Feature request: Allow `$queryRaw` and `$executeRaw` in transactions](https://github.com/prisma/prisma/issues/3828)
- [Support SQL Server in `executeRaw` and `queryRaw`](https://github.com/prisma/prisma/issues/3861)
- [Introduce stand-alone integration test package](https://github.com/prisma/prisma/issues/3864)
- [Separate test helpers into separate folder structure](https://github.com/prisma/prisma/issues/3878)
- [Stabilize `atomicNumberOperations`](https://github.com/prisma/prisma/issues/3917)
- [Introduce `prisma/engines` package](https://github.com/prisma/prisma/issues/3928)
- [Integration tests with SQL Server](https://github.com/prisma/prisma/issues/3932)
- [undefined is printed at the top of prisma/clidev](https://github.com/prisma/prisma/issues/4007)
[`prisma-client-js`](https://github.com/prisma/prisma-client-js)
- [ISO Dates with an offset is not working](https://github.com/prisma/prisma-client-js/issues/741)
- [PANIC: called `Result::unwrap()` on an `Err` value: Error("EOF while parsing a value", line: 1, column: 0)](https://github.com/prisma/prisma-client-js/issues/831)
[`migrate`](https://github.com/prisma/migrate)
- [[PostgreSQL] migrating column from jsonb[] to jsonb fails](https://github.com/prisma/migrate/issues/506)
- [Migration fails when attempting to change the column type in the absence of a working cast](https://github.com/prisma/migrate/issues/545)
- [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") } ](https://github.com/prisma/migrate/issues/606)
[`language-tools`](https://github.com/prisma/language-tools)
- [Warn about provider array deprecation in the VSCode plugin](https://github.com/prisma/language-tools/issues/522)
- [prisma-language-server cannot be ran as command](https://github.com/prisma/language-tools/issues/566)
- [LSP: Can't rename if the server getting position that is not the end of word.](https://github.com/prisma/language-tools/issues/576)
- [LSP: Please do best effort when the lsp-client doesn't support context option.](https://github.com/prisma/language-tools/issues/578)
- [Json should also show squiggly lines for MSSQL](https://github.com/prisma/language-tools/issues/591)
[`studio`](https://github.com/prisma/studio)
- [Studio enforces optional fields to be filled](https://github.com/prisma/studio/issues/551)
- [Reordering a column also sorts by that column](https://github.com/prisma/studio/issues/565)
- [Studio swallows all feature flags inside the `generator` block](https://github.com/prisma/studio/issues/568)
[`prisma-engines`](https://github.com/prisma/prisma-engines)
- [Query Engine: Native Types](https://github.com/prisma/prisma-engines/issues/73)
- [Introspection Engine: Native Types](https://github.com/prisma/prisma-engines/issues/74)
- [Native Types: Add support for non integer arguments](https://github.com/prisma/prisma-engines/issues/1145)
- [Proper parsing of JDBC connection strings](https://github.com/prisma/prisma-engines/issues/1155)
- [Composite key ordering in SQL Server](https://github.com/prisma/prisma-engines/issues/1209)
- [Do not use magic partial indices with SQL Server](https://github.com/prisma/prisma-engines/issues/1220)
- [Gate SQL Server from Migration Engine](https://github.com/prisma/prisma-engines/issues/1222)
- [Validator should disallow native type Text in combination with unique attribute for MySQL](https://github.com/prisma/prisma-engines/issues/1227)
- [Remove duplication in Introspection Engine tests](https://github.com/prisma/prisma-engines/issues/1236)
- [Move all preview feature flags into the generator block](https://github.com/prisma/prisma-engines/issues/1237)
- [Research: Understand compatibility of native types with PSL features](https://github.com/prisma/prisma-engines/issues/1246)
- [remove validation for optional 1:1 relations in MSSQL ](https://github.com/prisma/prisma-engines/issues/1278)
- [Remove ScalarType `Xml`](https://github.com/prisma/prisma-engines/issues/1283)
- [Implement default mapping for new scalar type `Decimal`](https://github.com/prisma/prisma-engines/issues/1285)
- [Implement default mapping for the scalar types `Bytes`](https://github.com/prisma/prisma-engines/issues/1286)