Hey <!everyone> :v: :prisma-cool: We just release...
# prisma-whats-new
Hey <!everyone> ✌️ prisma cool We just released Prisma 2.18.0 prisma rainbow ☝️
prisma introspect
is becoming
prisma db pull
we introduced the
prisma db push
command that enables developers to update their database schema from a Prisma schema file without using migrations. For the "opposite" motion (i.e., updating the Prisma schema from an existing database schema), we currently have the
prisma introspect
command. In this release,
prisma introspect
is being renamed to
prisma db pull
. However, the
prisma introspect
command will be kept around for a few more releases so that you have enough time to switch over to the new command. Here is how we are planning to execute the renaming: 1. In this release, we are introducing a new command
prisma db pull
, which behaves exactly the same as
prisma introspect
. 2. We will at some point in the near future add a deprecation warning to the
prisma introspect
CLI command. 3. Eventually,
prisma introspect
will be removed. There is no specific timeline to execute on this deprecation and we want to make sure we give developers a generous period of time to switch over. 🌱 More flexible seeding in TypeScript The
command options can now be customized via
to pass specific options to
. This makes
prisma db seed
work with tools that have specific requirements when used with TypeScript, such as Next.js. Here is an example that works with Next.js:
Copy code
  "name": "my-project",
  "version": "1.0.0",
  "scripts": {
    "ts-node": "ts-node --compiler-options '{\"module\":\"CommonJS\"}'"
  "devDependencies": {
    "@types/node": "^14.14.21",
    "ts-node": "^9.1.1",
    "typescript": "^4.1.3"
⚠️ Relation syntax will not be updated automatically any more Prisma has a set of rules for defining relations between models in the Prisma schema. The
prisma format
command automatically helps to apply these rules by inserting missing pieces. In previous releases, this expansion logic was applied automatically in several scenarios without running
npx prisma format
explicitly, e.g. when running a
prisma migrate
command. While helpful in some scenarios, these "magic" insertions often resulted in others errors that were harder to interpret and to debug for developers and ourselves. In this release, the "magical" instertions are removed and developers need to explicitly run
npx prisma format
if they want still make use of them. 🆕 New Upsert API for Prisma Client Go Prisma Client Go now supports upsert operations:
Copy code
post, _ := client.Post.UpsertOne(
    // query
    // set these fields if document doesn't exist already
    // update these fields if document already exists
🌈 3
🇵🇱 2
🏳️‍🌈 3
prisma green 8
windows 3
🇲🇾 2
🇽🇰 1
🇮🇷 1
prisma rainbow 15
🇨🇺 1
🇷🇺 3
👍 6
🇭🇷 1
🇬🇧 1
❤️ 1
🇫🇮 2
🇧🇻 2
🇦🇱 1
🇯🇲 1
🇳🇬 3
australia parrot 1
🇮🇳 1