PackageTrack

npm Β· #3659 most downloaded on npm

@prisma/client

7.10.0prisma/prisma β†—

Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.

Release timeline

10652 releases since 2020
20202026

Releases

  1. 6.4.0-dev.129 Jan 2025pre-release

    Nothing published for this version

  2. 6.3.14 Feb 2025
    Release notes

    This patch releases introduces improvements to the prisma init output when invoked to with the --db option.

    Run npx prisma@latest init --db to get an instant Prisma Postgres database.

    Open source β†’
  3. 6.3.028 Jan 2025
    Release notes

    Today, we are excited to share the 6.3.0 stable release πŸŽ‰

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release. 🌟

    Highlights

    A brand new Prisma Studio

    In this release we've included several great improvements to Prisma Studio's developer experience. You can learn all about the changes we've made in our release blog post, but here's a short list:

    Prisma Studio is back in the Console

    Fans of Prisma Data Browser rejoice! The new Prisma Studio is now in the Prisma Console and is available for all PostgreSQL and MySQL databases.

    A new model viewer

    Previously, switching from model to model in Prisma Studio would require backing all the way out to the model view, then digging in again. With our new UI, it's easy to switch from model to model while keeping your place.

    A new editing experience

    If you're trying to edit a given field in a model, Prisma Studio made it quite easy. However, if you're trying to edit every field in a given row, it could get quite annoying to keep scrolling left to right. Our new edit sidebar resolves that with the ability to edit all fields for a given row at once.

    Clean up at the click of a button

    When editing a number of models, it can get difficult to get back to a clean slate. In the new Prisma Studio, we've added a "Close all" button that puts you back to a fresh start.

    Add limit to updateMany() and deleteMany()

    Previously, limit has not existed as a valid option in top level updateMany() and deleteMany() queries. In 6.3.0 limit is now available in these queries, bringing their features more in line with other query types.

    You can use limit like the following:

    await prisma.user.deleteMany({
      where: { column: 'value' },
      limit: 100,
    });
    

    This will limit the number of deleted users to 100 at maximum.

    Sort generator fields deterministically

    In previous version of Prisma ORM, the fields inside of a generator block in your Prisma Schema were not deterministically sorted. This could lead to cases where prisma db pull could lead to re-ordering of fields.

    In 6.3.0, the sorting of fields in this block is now deterministic. You may see re-ordering on the first prisma db pull after you upgrade, but it will remain consistent afterwards.

    Replace NOT IN with NOT EXISTS for PostgreSQL relation filters

    In previous versions of Prisma ORM, when using the none or some relation filters, the SQL queries generated used NOT IN. In many cases this lead to performance issues as the size of the related table grew. In 6.3.0, we’ve replaced these usages of IN with EXISTS in order to improve query performance.

    A special thank you

    We'd like to extend our heartfelt thanks to @loren and his team for the collaboration and trust in our enterprise support plan. Working closely with them allowed us to address important issues like #19249 and #17303. Their insights and partnership have been invaluable in improving our product.

    If your team could benefit from dedicated support and tailored solutions, learn more about our enterprise support plan.

    Fixes and improvements

    Prisma Client

    Prisma

    Credits

    Huge thanks to @WhyAsh5114 for their contributions to this release!

    Open source β†’
  4. 6.3.0-integration-studio-ux-refinements.327 Jan 2025pre-release

    Nothing published for this version

  5. 6.3.0-integration-studio-ux-refinements.227 Jan 2025pre-release

    Nothing published for this version

  6. 6.3.0-integration-studio-ux-refinements.120 Jan 2025pre-release

    Nothing published for this version

  7. 6.3.0-integration-simpler-typeinfo-query.110 Jan 2025pre-release

    Nothing published for this version

  8. 6.3.0-integration-fix-subcommands-esm-projects.323 Jan 2025pre-release

    Nothing published for this version

  9. 6.3.0-integration-fix-subcommands-esm-projects.223 Jan 2025pre-release

    Nothing published for this version

  10. 6.3.0-integration-fix-subcommands-esm-projects.123 Jan 2025pre-release

    Nothing published for this version

  11. 6.3.0-integration-engines-6-3-0-6-integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03.210 Jan 2025pre-release

    Nothing published for this version

  12. 6.3.0-integration-engines-6-3-0-6-integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03.110 Jan 2025pre-release

    Nothing published for this version

  13. 6.3.0-integration-engines-6-3-0-5-integration-5-22-0-with-simplified-typeinfo-c41bc6f8547cc09d234cba92f0f78c0f8fd70b34.210 Jan 2025pre-release

    Nothing published for this version

  14. 6.3.0-integration-engines-6-3-0-5-integration-5-22-0-with-simplified-typeinfo-c41bc6f8547cc09d234cba92f0f78c0f8fd70b34.110 Jan 2025pre-release

    Nothing published for this version

  15. 6.3.0-integration-engines-6-3-0-2-integration-sql-nested-transactions5-9a074425ccc05b5ec12b88ec141ba5dea21472b7.28 Jan 2025pre-release

    Nothing published for this version

  16. 6.3.0-integration-engines-6-3-0-2-integration-sql-nested-transactions5-9a074425ccc05b5ec12b88ec141ba5dea21472b7.18 Jan 2025pre-release

    Nothing published for this version

  17. 6.3.0-integration-engines-6-3-0-18-integration-fix-aws-cli-version-18e9d973d7789a29d6b3c801dc30cb76c45ee0e0.228 Jan 2025pre-release

    Nothing published for this version

  18. 6.3.0-integration-engines-6-3-0-18-integration-fix-aws-cli-version-18e9d973d7789a29d6b3c801dc30cb76c45ee0e0.128 Jan 2025pre-release

    Nothing published for this version

  19. 6.3.0-integration-engines-6-3-0-1-feat-relation-exists-aff8bf73313e0df76046e671a2cb2d31491601a3.58 Jan 2025pre-release

    Nothing published for this version

  20. 6.3.0-integration-engines-6-3-0-1-feat-relation-exists-aff8bf73313e0df76046e671a2cb2d31491601a3.48 Jan 2025pre-release

    Nothing published for this version

  21. 6.3.0-integration-engines-6-3-0-1-feat-relation-exists-aff8bf73313e0df76046e671a2cb2d31491601a3.38 Jan 2025pre-release

    Nothing published for this version

  22. 6.3.0-integration-engines-6-3-0-1-feat-relation-exists-aff8bf73313e0df76046e671a2cb2d31491601a3.28 Jan 2025pre-release

    Nothing published for this version

  23. 6.3.0-integration-engines-6-3-0-1-feat-relation-exists-aff8bf73313e0df76046e671a2cb2d31491601a3.17 Jan 2025pre-release

    Nothing published for this version

  24. 6.3.0-dev.3328 Jan 2025pre-release

    Nothing published for this version

  25. 6.3.0-dev.3227 Jan 2025pre-release

    Nothing published for this version

  26. 6.3.0-dev.3124 Jan 2025pre-release

    Nothing published for this version

  27. 6.3.0-dev.3024 Jan 2025pre-release

    Nothing published for this version

  28. 6.3.0-dev.2924 Jan 2025pre-release

    Nothing published for this version

  29. 6.3.0-dev.2823 Jan 2025pre-release

    Nothing published for this version

  30. 6.3.0-dev.2723 Jan 2025pre-release

    Nothing published for this version

  31. 6.3.0-dev.2623 Jan 2025pre-release

    Nothing published for this version

  32. 6.3.0-dev.2523 Jan 2025pre-release

    Nothing published for this version

  33. 6.3.0-dev.2422 Jan 2025pre-release

    Nothing published for this version

  34. 6.3.0-dev.2322 Jan 2025pre-release

    Nothing published for this version

  35. 6.3.0-dev.2222 Jan 2025pre-release

    Nothing published for this version

  36. 6.3.0-dev.2122 Jan 2025pre-release

    Nothing published for this version

  37. 6.3.0-dev.2021 Jan 2025pre-release

    Nothing published for this version

  38. 6.3.0-dev.1921 Jan 2025pre-release

    Nothing published for this version

  39. 6.3.0-dev.1821 Jan 2025pre-release

    Nothing published for this version

  40. 6.3.0-dev.1721 Jan 2025pre-release

    Nothing published for this version

  41. 6.3.0-dev.1621 Jan 2025pre-release

    Nothing published for this version

  42. 6.3.0-dev.1520 Jan 2025pre-release

    Nothing published for this version

  43. 6.3.0-dev.1415 Jan 2025pre-release

    Nothing published for this version

  44. 6.3.0-dev.1315 Jan 2025pre-release

    Nothing published for this version

  45. 6.3.0-dev.1214 Jan 2025pre-release

    Nothing published for this version

  46. 6.3.0-dev.1113 Jan 2025pre-release

    Nothing published for this version

  47. 6.3.0-dev.1013 Jan 2025pre-release

    Nothing published for this version

  48. 6.3.0-dev.913 Jan 2025pre-release

    Nothing published for this version

  49. 6.3.0-dev.813 Jan 2025pre-release

    Nothing published for this version

  50. 6.3.0-dev.712 Jan 2025pre-release

    Nothing published for this version

  51. 6.3.0-dev.611 Jan 2025pre-release

    Nothing published for this version

  52. 6.3.0-dev.511 Jan 2025pre-release

    Nothing published for this version

  53. 6.3.0-dev.49 Jan 2025pre-release

    Nothing published for this version

  54. 6.3.0-dev.39 Jan 2025pre-release

    Nothing published for this version

  55. 6.3.0-dev.29 Jan 2025pre-release

    Nothing published for this version

  56. 6.3.0-dev.18 Jan 2025pre-release

    Nothing published for this version

  57. 6.2.18 Jan 2025
    Release notes

    Today we are releasing the 6.2.1 patch release to address an issue with some of the omitApi preview feature checks having been accidentally omitted when making the feature GA. Now it is fully functional without the preview feature flag.

    Changes

    • https://github.com/prisma/prisma/pull/25997
    Open source β†’
  58. 6.2.1-dev.28 Jan 2025pre-release

    Nothing published for this version

  59. 6.2.1-dev.18 Jan 2025pre-release

    Nothing published for this version

  60. 6.2.07 Jan 2025
    Release notes

    Today we're releasing Prisma ORM version 6.2.0 πŸŽ‰

    🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟

    We have a number of new features in this version, including support for json and enum fields in SQLite, a new updateManyAndReturn function, support for ULID values, as well as the promotion of the omit feature from Preview to Generally Availability.

    Highlights

    Excluding fields via omit is now production-ready

    Our number one requested feature is out of Preview and Generally Available. In 6.2.0, you no longer need to add omitApi to your list of Preview features:

    generator client {
      provider        = "prisma-client-js"
    - previewFeatures = ["omitApi"]
    }
    

    As a refresher: omit allows you to exclude certain fields from being returned in the results of your Prisma Client queries.

    You can either do this locally, on a per-query level:

    const result = await prisma.user.findMany({
      omit: {
        password: true,
      },
    });
    

    Or globally, to ensure a field is excluded from all queries of a certain model:

    const prisma = new PrismaClient({
      omit: {
        user: {
          password: true
        }
      }
    })
    
    // The password field is excluded in all queries, including this one
    const user = await prisma.user.findUnique({ where: { id: 1 } })
    

    For more information on omit, be sure to check our documentation.

    json and enum fields in SQLite

    Previous to this version, you could not define json and enum fields in your Prisma schema when using SQLite. The respective GitHub issues have been among the most popular ones in our repo, so with our new approach to open-source governance, we finally got to work and implemented these.

    Working with JSON and Enum fields works similarly to other database providers, here’s an example:

    datasource db {
      provider = "sqlite"
      url      = "file:./dev.db"
    }
    
    model User {
      id   Int    @id @default(autoincrement())
      name String
      role Role  
      data Json
    }
    
    enum Role {
      Customer
      Admin 
    }
    

    Support for auto-generated ULID values

    Similar to cuid2 support released in ORM version 6.0.0, we are now adding support for Universally Unique Lexicographically Sortable Identifiers (or short: ULIDs πŸ˜„) in version 6.2.0. A ULID value is a 26-character alphanumeric string, e.g. 01GZ0GZ3XARH8ZP44A7TQ2W4ZD.

    With this new feature, you can now create records with auto-generated ULID values for String fields:

    model User {
      id String @id @default(ulid())  
    }
    

    New batch function: updateManyAndReturn

    updateMany allows you to update many records in your database, but it only returns the count of the affected rows, not the resulting rows themselves. With updateManyAndReturn you are now able to achieve this:

    const users = await prisma.user.updateManyAndReturn({
      where: {
        email: {
          contains: 'prisma.io',
        }
      },
      data: {
        role: 'ADMIN'
      }
    })
    

    This call to updateManyAndReturn will now return the actual records that have been updated in the query:

    [{
      id: 22,
      name: 'Alice',
      email: '[email protected]',
      profileViews: 0,
      role: 'ADMIN',
      coinflips: []
    }, {
      id: 23,
      name: 'Bob',
      email: '[email protected]',
      profileViews: 0,
      role: 'ADMIN',
      coinflips: []
    }]
    

    Please note that like createManyAndReturn, updateManyAndReturn is only supported in PostgreSQL, CockroachDB, and SQLite.

    Fixed runtime error in Node.js v23

    While not officially supported, we understand that a lot of you like to be on the latest Node.js version β€” so we fixed an error that only occurred on Node.js 23. Happy coding ✌️

    Prisma is hiring 🀝

    Join us at Prisma to work on the most popular TypeScript ORM and other exciting products like the first serverless database built on unikernels!

    We currently have two open roles in our Engineering team:

    If these don’t fit, you can still check out our jobs page and send a general application.

    Open source β†’