# Announcing Prisma ORM 7.2.0 URL: https://www.prisma.io/blog/announcing-prisma-orm-7-2-0 Published: 2025-12-17 Authors: Mike Hartington Tags: orm Description: Prisma ORM 7.2.0 is out with key improvements: the return of the --url flag, smarter prisma init configs for Node and Bun, better CLI errors, and fixes for @db.Money. Upgrade today. We just released Prisma ORM 7.2.0, which includes several bug fixes and improvements. We’ve also been reviewing community feedback on Prisma 7 and making adjustments to better support your needs. ## Upgrading to 7.2 [#upgrading-to-72] To upgrade to the latest release, install the appropriate packages using the `@latest` tag: ```shell # The Prisma CLI npm install prisma@7.9.1 --save-dev # The Prisma Client Library npm install @prisma/client@7.9.1 # The adapter for your database npm install @prisma/adapter-pg@latest ``` ## Bringing back the `--url` flag to Prisma CLI [#bringing-back-the---url-flag-to-prisma-cli] In v7, we removed the `--url` flag from various `prisma db` subcommands. This flag was mostly undocumented, and we didn’t think many people were using it. However, community feedback showed that this flag was extremely useful. As a result, we’ve brought it back in v7.2.0 and made updates to support the new Prisma config setup. Now whenever you run the following commands: * `prisma db pull` * `prisma db push` * `prisma migrate dev` If you pass a `--url` pointing to your datasource, the Prisma CLI will use it instead of what’s defined in your `prisma.config.ts`. ## Customized `prisma init` output based on JS runtime [#customized-prisma-init-output-based-on-js-runtime] As part of the move to a Prisma config file, running `prisma init` would generate a default config file with the following output: ```tsx // This file was generated by Prisma and assumes you have installed the following: // npm install --save-dev prisma@7.9.1 dotenv import "dotenv/config"; import { defineConfig, env } from "prisma/config"; export default defineConfig({ schema: "prisma/schema.prisma", migrations: { path: "prisma/migrations", }, datasource: { url: env("DATABASE_URL"), }, }); ``` This works most of the time, but it makes some assumptions that aren’t always valid. For instance, we explicitly import `dotenv` here, which is only needed in Node and not required in Bun. To address this, we’ve added runtime-specific config output based on the JavaScript environment. If `prisma init` is run in Bun, it will generate the following: ```tsx // This file was generated by Prisma, and assumes you run Prisma commands using `bun --bun run prisma [command]`. import { defineConfig, env } from "prisma/config"; export default defineConfig({ schema: "prisma/schema.prisma", migrations: { path: "prisma/migrations", }, datasource: { url: env("DATABASE_URL"), }, }); ``` For Node environments (`npx`, `pnpm`, `bunx`, `bun run`): ```tsx // This file was generated by Prisma and assumes you have installed the following: // npm install --save-dev prisma@7.9.1 dotenv import "dotenv/config"; import { defineConfig } from "prisma/config"; export default defineConfig({ schema: "prisma/schema.prisma", migrations: { path: "prisma/migrations", }, datasource: { url: process.env["DATABASE_URL"], }, }); ``` Here, we still need `dotenv` and can remove the need to use the `env` helper function. ## Optional URL for `prisma generate` and better error messages [#optional-url-for-prisma-generate-and-better-error-messages] Additionally, we’ve reworked how the Prisma CLI behaves when your Prisma config has an undefined URL. With 7.2.0, `prisma generate` can now be run even if you don’t set an environment variable for your database URL. We also improved error messages when you choose to use the `env` helper function. If you try to run `prisma generate` while using the helper function to enforce variables being set, you’ll see the following error: ```shell Failed to load config file "[path]/prisma.config.ts" as a TypeScript/JavaScript module. Error: PrismaConfigEnvError: Cannot resolve environment variable: UNDEFINED_VARIABLE ``` As a bonus, if you try to run `prisma db ...` without a valid URL, you’ll now get a clearer error message: ```shell Error: The datasource.url property is required in your Prisma config file when using prisma db push. ``` ## `[DecimalError] Invalid argument` when using the `@db.Money` type [#decimalerror-invalid-argument-when-using-the-dbmoney-type] If you’ve been using the `@db.Money` type in your Prisma schema, you might have run into an issue where values over 999.99 would throw an error like `[DecimalError] Invalid argument: X,XXX`. Parsing money values from Postgres is complicated due to locale differences and the wide range of accepted formats. This issue was reported back in July, and we’re thrilled that it’s been fixed in 7.2.0. ## Where to go next [#where-to-go-next] * [Explore Prisma ORM](https://www.prisma.io/orm) for the latest Prisma 7 releases and capabilities. * [Review the Prisma 7 upgrade guide](https://www.prisma.io/docs/guides/upgrade-prisma-orm/v7) before rolling 7.2.0 out more broadly. * [Refresh your Prisma Client generation setup](https://www.prisma.io/docs/orm/v7/prisma-client/setup-and-configuration/generating-prisma-client) if you're adopting the newer Prisma config workflow. ## Parting Thoughts [#parting-thoughts] As we mentioned in a previous post, we’re aware of a performance regression that appears in some specific cases. We’re actively working on a fix and plan to release it as soon as possible. We’ll share more updates once the fix has been merged and released. Be sure to follow us on social media to stay up to date with the latest releases of Prisma ORM and Prisma Postgres: * [X/Twitter](https://x.com/prisma) * [Bluesky](https://bsky.app/profile/prisma.io) * [YouTube](https://www.youtube.com/@PrismaData) * [LinkedIn](https://www.linkedin.com/company/prisma-io/) * [Discord](https://pris.ly/discord)