Today, we are issuing the twenty-fifth Preview release: 2.0.0-preview025
(short: preview025
).
Breaking changes
Renaming the prisma2
npm package
With this release, we're renaming the Prisma 2 CLI npm package from prisma2
to @prisma/cli
. Note that you can still invoke the CLI using the prisma2
command!
To upgrade, you first should uninstall the current prisma2
version and then install the @prisma/cli
package.
Local installation (recommended)
The local installation is generally preferred since it prevents conflicting versions of the same package.
# Uninstall current `prisma2` CLI (`preview024` or earlier)
npm uninstall prisma2
# Install new `prisma2` CLI via `@prisma/cli` npm package
npm install @prisma/cli --save-dev
# Invoke the CLI via `npx`
npx prisma2
Global installation
# Uninstall current `prisma2` CLI (`preview024` or earlier)
npm uninstall -g prisma2
# Install new `prisma2` CLI via `@prisma/cli` npm package
npm install -g @prisma/cli
# Invoke the CLI via `npx`
npx prisma2
Other
- The
prisma2 --version
output changed - Virtual relation fields (aka “back-relation fields”) follow the same name as the model they relate to during introspection
- The default for
errorFormat
in thePrismaClient
constructor now iscolorless
Fixes and improvements per Prisma 2 repository
prisma2
- feat(prisma2/cli): allow arbitrary generator commands with flags
- Update docs to reflect existing examples
- Comments in schema's
datasource
block fail withError: Schema parsing error: Unexpected token. Expected one of: End of block ("}"), alphanumeric identifier
- get-config gets the datamodel from the env vars
- Relation table for implicit m:n-relation not recognized by introspection
- update postgres integration tests
- [Introspection]
error: Argument 'value' is missing in attribute '@default'.
- add instructions for adding bug reports
- Investigate if we can hide GraphQL Playground on CSB
- Remove AUMFIDARR guardrails
- Failed to validate the query
Error occurred during query validation & transformation
: - PostgreSQL: "incorrect binary data format in bind parameter x"
- [Introspection] Comment out all unsupported column types
- MySQL: "DateTime value not stored as DateTime, Int or string"
- sqlite/chinook returns
PANIC: Could not parse stored DateTime string: 2009-01-01 00:00:00: ParseError(Invalid)
on findMany() - AWS Lambda timed out
- Don't expose GraphQL Playground
- [Introspection] Guardrail: Remove default values we do not support
- [Introspection] Relation guardrail creates duplicate fields
- [Introspection] Decide on a way forward for introspection of types our internal type system currently cannot represent
- Schema Validation fails with panic
thread 'main' panicked at 'Expected ID field ... to be present on the model'
- Remove opinionated casing for back relation field names
- Unclear rust error PANIC
- "Oops. We could not send the error report."
- [Introspection] "The model 'x' cannot be defined because a model with that name already exists."
- [Introspection] Crashes when default value contains line breaks
- Expand --version command
- [Introspection] "created_at timestamp with time zone not null default now()" doesn't work
- [Introspection] ID = (Scalar, RelationField)
- Explicit many to many relationships with/without extra columns
@default
doesnt work for enum
prisma-client-js
- Fix .raw with parameters for PostgreSQL
- Using raw queries with tagged template literals doesn't include parameters
- Fix downloading HTTPS file with HTTP proxy
- Change default error formatting from
pretty
tocolorless
- Some models return
Error parsing GraphQL query: query parse error: Parse error at 4:3 Unexpected
}[Punctuator]Expected
Name fromfindMany({})
after introspection - Can't query models without scalar fields
- prisma2 generate always uses yarn even if you're using NPM in your project
- Cannot find module '@prisma/client' after installing a new package via NPM
- Mutating a
Float
sometimes results on sightly different value written to Postgres - Export the current Prisma version
- Using a relation as @id or in @@unique doesn't work
- Some models return
undefined
fromfindMany({})
after introspection - 3 way join with @@id failing when querying
- find by composite primary keys API is super weird
- Can't findOne, update, delete on composite primary keys
- Find by a null time doesn't work
- Find with exact DateTime input doesn't work with findMany or findOne
- Gracefully handle incorrect id column type
- Nested writes don't work on 3rd level with required relation
prisma-engines
- [WIP] new @relation validations
- Fix unused value warning in test
- Set the pool constraints in QE
- Health check fixes
- Test unique fields as ID on postgres
- New relations in the migration engine
- [WIP] IE Changes
- Unify dml error handling
- Test postgres array defaults
- Make dmmf dm errors more beautiful
- Schema validation errors broken since alpha 940
- Citext
- The dmmf cli cmd should not crash for env vars
- Test and fix postgres default handling
- Remove the camelcasing for backrelation fields
- Set all datamodel-related flags in structopt
- Add an introspect subcommand to test-cli
- Test mysql defaults
- Adjust legacy M:N Relation Inference
- Test all identifier types on mysql
- Disable playground by default, flag for enabling
- Test postgres exotic filters
- Discriminate between unsupported types and those that cast to string
- Comment out Unsupported Datatypes
- Avoid unecessary allocation in quaint query building
- Recognize all Prisma 1.0 relations as Implicit Many2Many relations
- Postgres exotic filters
- Do not
SELECT 1
before every query - Test new supported column types
- Adapt ME tests to new defaults handling
- QE: Batch huge
IN
queries into smaller batches - Remove logic for dropping relations when they are part of the ID
- Batch big IN/NOT IN selections
- fix(errors): move some errors back in spec
- QE: Optimize the compound id select
- [WIP] Introduce
dbGenerated()
for Default values - Extend Benchmarking Suite
- Query Engine: SQL connector must use chunking when a large number of prisma-engines is reached
- Reduce cloning in nested read
- Make implicit relation rules explicit with prisma-fmt