Today, we are issuing the seventeenth Preview release: 2.0.0-preview017
(short: preview017
). Note that this release includes a major breaking change with respect to where Photon.js is being generated and how it's imported into your code. Read more below!
Note that we recently adjusted the versioning schema in order to fully comply to the semver spec (the first release with the new version schema was 2.0.0-preview014
).
Breaking changes
Photon.js generation and usage
With this release, we're implementing the facade package @prisma/photon
for Photon.js. This means, instead of generating Photon.js into node_modules/@generated/photon
, it is now being generated into node_modules/@prisma/photon
.
Furthermore, you now must add the @prisma/photon
package to your project dependencies:
npm install @prisma/photon
Consequently, the Photon
constructor is now imported from @prisma/photon
into your code:
- import { Photon } from '@generated/photon'
+ import { Photon } from '@prisma/photon'
Also note that the versions of @prisma/photon
and your prisma2
CLI installation must be the same! It is therefore recommended to add prisma2
as a development dependency to you project. Global installations of prisma2
are discouraged because it's more difficult to keep them in sync with individual projects.
You can add prisma2
as a development dependeency as follows:
npm install prisma2 --save-dev
You can now invoke this local prisma2
installation using npx
:
npx prisma2
Usage of custom binaries in Photon.js
If you're using the platforms
field on your Photon.js generator to explicitly specify a build target for the binaries that are used by Photon.js, you might need to update the naming of the binaries. Here's how the names have changed:
Before | After |
---|---|
windows
| windows
|
darwin
| darwin
|
linux-glibc-libssl1.0.1
| debian-openssl-1.0.x
|
linux-glibc-libssl1.0.2
| debian-openssl-1.0.x
|
linux-glibc-libssl1.1.0
| debian-openssl-1.1.x
|
linux-glibc-libssl1.1.1
| debian-openssl-1.1.x
|
If you're using a RHEL-based systems (Fedora, Centos, etc.), replace debian
with rhel
, e.g. rhel-openssl-1.1.x
.
You can learn more about this in the spec.
Fixes and improvements per Prisma Framework repository
prisma2
- CLI: Rename Prisma 2 to Prisma Framework
- RecordDoesNotExist Comeback!
- prisma2 init flow is throwing "File name too long"
- Query was empty error on Preview 16
- Type Aliases not working
- Docs for the
postinstall
script of theprisma2
npm package - Document how to build binaries in debug mode
- Remove stability limitation docs
- Error with Prisma v15: can't find prisma.schema
- CodeSandBox core dump investigation
- Error: QueryError(QueryError(UniqueConstraintViolation { field_name: "A, _MovieToWriter" }
- Document native import/export workflows
- End to end testing of CLI init flows
- Contribution documentation: Local setup to be able to develop and use Prisma
- Error: spawn E2BIG
photonjs
- Photon.js not usable with Heroku DB and ZEIT Now V2 due do DB connection limit
- The findOne throws RecordDoesNotExist in alpha.282
lift
prisma-engine
- Build pipeline rework.
- Query engine: integer fields return floats
- Add instructions for compiling binaries in debug mode to README
- Fix joins against the same table when not necessary
- Introspection Engine: Implement and Test
getDatabaseMetadata
andlistDatabases
- Refactoring: Centralize SQL connection handling into central crate
- fix: return type for findMany* should be non-nullable
- Build OS-based binaries instead of platform-based