Prisma: 2.0.0-preview014 Release

Release date:
October 11, 2019
Previous version:
2.0.0-preview013.3 (released October 7, 2019)
Magnitude:
2,666 Diff Delta
Contributors:
3 total committers
Data confidence:
Commits:

37 Commits in this Release

Ordered by the degree to which they evolved the repo in this version.

Authored October 2, 2019
Authored October 4, 2019
Authored October 9, 2019
Authored October 8, 2019
Authored October 5, 2019
Authored October 5, 2019
Authored October 8, 2019
Authored October 8, 2019
Authored October 8, 2019
Authored October 11, 2019
Authored October 11, 2019
Authored October 7, 2019
Authored October 7, 2019
Authored October 8, 2019
Authored October 8, 2019
Authored October 8, 2019
Authored October 9, 2019
Authored October 8, 2019
Authored October 8, 2019
Authored October 8, 2019
Authored October 10, 2019
Authored October 11, 2019
Authored October 8, 2019
Authored October 8, 2019
Authored October 9, 2019
Authored October 10, 2019
Authored October 10, 2019
Authored October 7, 2019
Authored October 7, 2019
Authored October 7, 2019
Authored October 11, 2019
Authored October 11, 2019
Authored October 11, 2019
Authored October 8, 2019
Authored October 11, 2019
Authored October 11, 2019

Top Contributors in 2.0.0-preview014

timsuchanek
nikolasburk
johannesschobel

Directory Browser for 2.0.0-preview014

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

Today, we are issuing the fourteenth Preview release: 2.0.0-preview014 (short: preview014).

Note that we adjusted the versioning schema (from 2.0.0-preview-14 to 2.0.0-preview014) in order to fully comply to the semver spec.

Breaking changes

Removing the nexus-prisma generator from the Prisma schema

In version 2.0.0-preview014, the nexus-prisma generator is not available any more. When using nexus-prisma, you can install it as an npm dependency, just like you do with other libraries. Find an updated example of how to using nexus-prisma to build a GraphQL API here.

Self-relations must be disambiguated with the @relation attribute

In previous releases, this used to be a valid schema:

model User {
  id         String @id @default(cuid())
  marriedTo  User?
  spouseOf   User?
}

In previous versions, it was inferred that both relation fields, marriedTo and spouseOf, would belong to the same relation, i.e. it was interpreted as follows:

model User {
  id         String @id @default(cuid())
  marriedTo  User? @relation("MarriedUsers")
  spouseOf   User? @relation("MarriedUsers")
}

From this release onwards, adding the @relation attribute is required in order to disambiguate this relation.

The platforms field of generators in the schema has been renamed to binaryTargets

generator photon {
  provider = "photonjs"
  platforms = ["darwin"]
}

now becomes prisma generator photon { provider = "photonjs" binaryTargets = ["darwin"] }

pinnedPlatform is now an env var

If you want to specify the concrete binary target or a binary path for the query engine, you can use the PRISMA_QUERY_ENGINE_BINARY env var. Just pass it in to the process running Photon.js and it will be picked up.

In order to also customize the Lift engine path, you can run the prisma2 cli while providing PRISMA_MIGRATION_ENGINE_BINARY.

Major changes

For this release, we have invested a lot into fixing bugs across the stack. Try it out yourself:

npm install -g prisma2
prisma2 init hello-world

Please share your feedback and report any issues you might encounter!

Fixes and improvements per Prisma 2 repository

prisma2

photonjs

lift

studio

prisma-engine