@prisma/sdk
4.0.0 · 28 Jun 2022Apache-2.040.1k / weekRepositoryHomepagenpmAtom feed
3.15.2 is the newest release of 3.x.
In short
24 new
Release note
Today, we are excited to share the 3.8.0 stable release 🎉
🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
Major improvements and new features
Full-text search support for MySQL is now in Preview
We're back from the holidays with a special treat for you.
Prisma now supports full-text search in MySQL. You can enable full-text support by adding the fullTextIndex and fullTextSearch Preview flags in your Prisma schema and defining @@fulltext() indexes on fields you'd like to use full-text search on.
generator client {
provider = "prisma-client-js"
previewFeatures = ["fullTextIndex", "fullTextSearch"]
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
model Post {
id Int @id @default(autoincrement())
title String @unique
@@fulltext([title])
}Run prisma db push or prisma migrate dev to update your database schema. Prisma Client will also be re-generated, enabling you to use full-text search in your application.
// search for titles that contain cat, but not fox
await prisma.post.findMany({
where: {
title: {
search: "+cat -fox",
},
},
})Learn more in our documentation.
dataProxy and interactiveTransactions Preview Features are now mutually exclusive
Before Prisma 3.8.0, Prisma $transaction queries would fail whenever the Data Proxy and Interactive Transactions Preview features were used together. The interactiveTransactions and dataProxy Preview flags cannot be used together in this release. Generating the Prisma Client when both Preview features are enabled will throw an error.
Fixed support for push when adding an element to an array in MongoDB
In 3.8.0, we fixed push support for ObjectIds on MongoDB.
Given the following schema:
model Course {
id String @id @default(dbgenerated()) @map("_id") @db.ObjectId
title String
students String[] @db.Array(ObjectId)
}You can now run the following query:
// Add a new student to the course
await prisma.course.update({
where: {
id: 1
},
data: {
students: {
push: new ObjectID("...")
}
}
})A special thanks to Anthony Luzquiños for raising this issue!
Fixes and improvements
Prisma Migrate
@map field name swap causes "Field is already defined on model" error
Prisma format adds invalid fragments to schema if composites are present on a model
Prisma Client
MDBE: Design document for adding
typesupport to the Query EngineError querying the database: db error: ERROR: unsupported startup parameter: options@prisma/clientintermittently added and removed fromtransitivePeerDependenciesin lockfile
Language tools (e.g. VS Code)
Provider-aware auto-completion is not applied to all auto completions
VSCode plugin formatting no longer uses editor
tabSizeconfiguration when indenting blocks
Prisma Studio
Join us for another "What's new in Prisma" livestream
Learn about the latest release and other news from the Prisma community by joining us for another "What's new in Prisma" livestream.
The stream takes place on YouTube on Thursday, January 13 at 5 pm Berlin | 8 am San Francisco.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.