# Prisma ORM 6.18.0, Postgres Database Metrics and Config Modernization URL: https://www.prisma.io/blog/announcing-prisma-6-18-0 Published: 2025-10-22 Authors: Mike Hartington Tags: announcement, orm Description: Catch up on the lates 6.18.0 release for Prisma ORM and Prisma Postgres. > Blog posts describe Prisma as it was on the date shown and are not kept current. Before implementing from a post, check the documentation index at https://www.prisma.io/docs/llms.txt and the changelog at https://www.prisma.io/changelog.md. > For an index of every published post, fetch https://www.prisma.io/blog/llms.txt. We just released Prisma [6.18.0](https://github.com/prisma/orm/releases/tag/6.18.0) with several bug fixes and improvments. Additionally, we added more support for the Prisma Config file to prepare for the next major release of Prisma ORM. ## In-depth Database Metrics [#in-depth-database-metrics] Last release, we included a new workspace metrics overview, so folks can get a quick glance on their usage data across your entire workspace. Now, we’ve added more insights into your database usage with database metrics. ![](https://www.prisma.io/blog/announcing-prisma-6-18-0/imgs/9393decb8beaf4ed3d4df4be8ab04809a83dcdfc-2880x1664.png) Here, you can view the usage of an individual database, with stats on: * Number of operations * Cache utilization * Average Response Size * Total egress * Average query duration In addition to these stats, you can also get insight into ways to improve caching and overall database performance ## Init with `prisma.config.ts` automatically [#init-with-prismaconfigts-automatically] As we prepare for Prisma v7, we’re moving more functionality into the `prisma.config.ts` file so developers can adopt it and not be caught off guard. To assist with this, we’ve moved to make `prisma init` automatically create a config file when you start a new project. Now, fields that have historically been in the `schema.prisma` file can be set in your config file. This will become the new place for these fields come Prisma v7. ## Define your datasource in `prisma.config.ts` [#define-your-datasource-in-prismaconfigts] If you’re adopting the new `prisma.config.ts` setup in your projects, version 6.18.0 brings the ability to set your datasource directly in your config file. Once this is in your config file, any datasource set in your `schema.prisma` will be ignored. To set the datasource, we also must include the new `engine` key which we can set to `"classic"`, which will be required for Prisma v7 ```typescript import { defineConfig, env } from "prisma/config"; export default defineConfig({ // The Rust-compiled schema engine engine: "classic", datasource: { url: env("DATABASE_URL"), }, }); ``` ## Migrating to `prisma.config.ts` [#migrating-to-prismaconfigts] A good amount of work we’ve done in 6.18.0 has been to get the Prisma Config to match functionality to the Schema file. For with this release, we’d like to encourage developer to begin migrating to the Prisma Config. This way we can gather more feedback before we hit our next major release and can address any gaps in functionality. As part of this, we’ve included a small migration guide below for developers to follow. 1. Updates to `schema.prisma` ```diff generator client { - provider = "prisma-client-js" + provider = "prisma-client" + output = "../src/generated/prisma" + engineType = "client" } - datasource db { - provider = "postgresql" - url = env("DATABASE_URL") - } ``` 2. Add any drivers you may need for your database If you’re using, for example PostgresSql, you’ll need to add the necessary driver. In this case `@prisma/adapter-pg` can be used. If you’re using Prisma Postgres, then there’s no extra steps needed here. ```shell npm install @prisma/adapter-pg ``` Then in your `PrismaClient` setup, add the adapter as an optional parameter. ```ts import { PrismaClient } from './generated/prisma' import { PrismaPg } from '@prisma/adapter-pg' const adapter = new PrismaPg({ connectionString: env.DATABASE_URL }) const prisma = new PrismaClient({ adapter }) ``` 3. Migrate to `prisma.config.ts` The `prisma.config.ts` is the new home for configuring your Prisma project. ```tsx import path from "node:path"; import { defineConfig, env } from "prisma/config"; export default defineConfig({ schema: path.join("prisma", "schema.prisma"), migrations: { path: path.join("prisma", "migrations"), }, engine: "classic", datasource: { url: env('DATABASE_URL'), } }); ``` For a full reference of the options that can be used in Prisma Config, see the [docs](https://www.prisma.io/docs/orm/v7/reference/prisma-config-reference). Be sure to follow us on social media to stay up to date with all the latest release of Prisma ORM and Prisma Postgres * [X/Twitter](https://x.com/prisma) * [Bluesky](https://bsky.app/profile/prisma.io) * [LinkedIn](https://www.linkedin.com/company/prisma-io/) * [Discord](https://pris.ly/discord)