Hey <!everyone> :v: :prisma-cool:, We are excited...
# prisma-whats-new
d
Hey <!everyone> ✌️ prisma cool, We are excited to announce that we just released *Prisma 3.1.1* prisma rainbow Today’s release includes the following major improvements: prisma Referential Integrity in in Preview Relational databases typically ensure integrity between relations with foreign key constraints, for example, given a 1:n relation between 
User:Post
, you can configure the deletion of a user to cascade to posts so that no posts are left pointing to a User that doesn’t exist. In Prisma, these constraints are defined in the Prisma schema with the 
@relation()
 attribute. However, databases like PlanetScale do not support defining foreign keys. To work around this limitation so that you can use Prisma with PlanetScale, we’re introducing a new 
referentialIntegrity
 setting in Preview. This was initially introduced in version 
2.24.0
 of Prisma with the 
planetScaleMode
 Preview feature and setting. Starting with this release both have been renamed to 
referentialIntegrity
. The setting lets you control whether referential integrity is enforced by the database with foreign keys (default), or by Prisma, by setting 
referentialIntegrity = "prisma"
. Setting Referential Integrity to 
prisma
 has the following implications: • Prisma Migrate will generate SQL migrations without any foreign key constraints. • Prisma Client will emulate foreign key constraints and referential actions on a best-effort basis. You can give it a try in version 3.1.1 by enabling the 
referentialIntegrity
 preview flag:
Copy code
datasource db {
  provider             = "mysql"
  url                  = env("DATABASE_URL")
  referentialIntegrity = "prisma"
}

generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["referentialIntegrity"]
}
⚠️ Note that Referential Integrity is set to
prisma
by default when using MongoDB. 📚Learn more about Referential Integrity in our documentation. prisma red Full-Text Search for the Go Client In an earlier release, we added Full-Text Search (for PostgreSQL) to the Typescript Client. This was released as a Preview feature. In this release, we’ve added that Preview feature to the Go Client. Enable it in your Go project by adding the 
fullTextSearch
 preview feature. Here’s an example:
Copy code
// Fetch all drafts with a title that contains the words fox or dog
posts, _ := client.Post.FindMany(
  db.Post.Title.Search("fox | dog"),
  db.Post.Status.Equals("Draft"),
).Exec(context.Background())

// Loop over the posts and print the title
for _, post := range posts {
  fmt.Println(post.Title)
}
🇦🇺 1
fast parrot 30
🔥 8
🏳️‍🌈 6
🙏 4
💥 3
party postgres 4
🇰🇷 11
😎 1
🇫🇷 2
🇺🇦 1
🇱🇰 1
💚 8
🇮🇳 8
🇩🇪 5
🇬🇪 2
prisma green 6
🎉 5
go gopher dance 3
💯 11
❤️ 24
😍 6
🇯🇵 6
🇰🇪 5
🚀 5
3
prisma xmas 2
🇵🇰 2
🇻🇪 1
🇿🇼 1
1
🇧🇴 1
🇻🇳 2
🇩🇯 1
🇲🇦 1
🇳🇿 1
🇵🇱 1
🇳🇬 2
prisma rainbow 13