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

10653 releases since 2020
20202026

One column per quarter.

Releases

  1. 5.13.0-integration-help-promo.122 Apr 2024pre-release

    Nothing published for this version

  2. 5.13.0-integration-exclude.212 Apr 2024pre-release

    Nothing published for this version

  3. 5.13.0-integration-exclude.112 Apr 2024pre-release

    Nothing published for this version

  4. 5.13.0-integration-engines-5-13-0-9-integration-multi-prisma-fmt-bfd6805a8c6880cd0161f6e57189b9fb8c6bcc7f.29 Apr 2024pre-release

    Nothing published for this version

  5. 5.13.0-integration-engines-5-13-0-9-integration-multi-prisma-fmt-bfd6805a8c6880cd0161f6e57189b9fb8c6bcc7f.19 Apr 2024pre-release

    Nothing published for this version

  6. 5.13.0-integration-engines-5-13-0-8-feat-exclude-selection-4dcfb875515e5fb2f92a6d294ae5a27098f97dd7.19 Apr 2024pre-release

    Nothing published for this version

  7. 5.13.0-integration-engines-5-13-0-4-integration-c-abi-47890da9156681a133402e7b4a5a3e27b8095ee1.15 Apr 2024pre-release

    Nothing published for this version

  8. 5.13.0-integration-engines-5-13-0-3-feat-exclude-selection-e76495825e7475c1f31801a6b5e233caa6edebb8.14 Apr 2024pre-release

    Nothing published for this version

  9. 5.13.0-integration-engines-5-13-0-19-feat-d1-compatible-sqlite-migration-61ede41e91f79e295f2ed2d4734286808784eb2e.112 Apr 2024pre-release

    Nothing published for this version

  10. 5.13.0-integration-engines-5-13-0-18-feat-exclude-selection-567a3e894bb45c200d072d568ea64adc3d8afb94.111 Apr 2024pre-release

    Nothing published for this version

  11. 5.13.0-integration-engines-5-13-0-17-feat-get-config-multi-file-be6e6284945aad03ebe0292e0e1aa8174e499d0b.111 Apr 2024pre-release

    Nothing published for this version

  12. 5.13.0-integration-engines-5-13-0-12-integration-multi-prisma-fmt-be1faff81ac8a57f8b2be5368d18c61807f5a295.210 Apr 2024pre-release

    Nothing published for this version

  13. 5.13.0-integration-engines-5-13-0-12-integration-multi-prisma-fmt-be1faff81ac8a57f8b2be5368d18c61807f5a295.110 Apr 2024pre-release

    Nothing published for this version

  14. 5.13.0-integration-engines-5-13-0-10-feat-exclude-selection-0e36efc9f3b5aa64f9d3911568b7280ae9c4505d.19 Apr 2024pre-release

    Nothing published for this version

  15. 5.13.0-integration-diff-output.84 Apr 2024pre-release

    Nothing published for this version

  16. 5.13.0-integration-diff-output.74 Apr 2024pre-release

    Nothing published for this version

  17. 5.13.0-integration-diff-output.63 Apr 2024pre-release

    Nothing published for this version

  18. 5.13.0-integration-diff-output.33 Apr 2024pre-release

    Nothing published for this version

  19. 5.13.0-integration-diff-output.23 Apr 2024pre-release

    Nothing published for this version

  20. 5.13.0-integration-diff-output.13 Apr 2024pre-release

    Nothing published for this version

  21. 5.13.0-dev.3722 Apr 2024pre-release

    Nothing published for this version

  22. 5.13.0-dev.3622 Apr 2024pre-release

    Nothing published for this version

  23. 5.13.0-dev.3522 Apr 2024pre-release

    Nothing published for this version

  24. 5.13.0-dev.3422 Apr 2024pre-release

    Nothing published for this version

  25. 5.13.0-dev.3314 Apr 2024pre-release

    Nothing published for this version

  26. 5.13.0-dev.3112 Apr 2024pre-release

    Nothing published for this version

  27. 5.13.0-dev.3011 Apr 2024pre-release

    Nothing published for this version

  28. 5.13.0-dev.2911 Apr 2024pre-release

    Nothing published for this version

  29. 5.13.0-dev.2811 Apr 2024pre-release

    Nothing published for this version

  30. 5.13.0-dev.2710 Apr 2024pre-release

    Nothing published for this version

  31. 5.13.0-dev.2610 Apr 2024pre-release

    Nothing published for this version

  32. 5.13.0-dev.2510 Apr 2024pre-release

    Nothing published for this version

  33. 5.13.0-dev.2410 Apr 2024pre-release

    Nothing published for this version

  34. 5.13.0-dev.2310 Apr 2024pre-release

    Nothing published for this version

  35. 5.13.0-dev.229 Apr 2024pre-release

    Nothing published for this version

  36. 5.13.0-dev.219 Apr 2024pre-release

    Nothing published for this version

  37. 5.13.0-dev.209 Apr 2024pre-release

    Nothing published for this version

  38. 5.13.0-dev.198 Apr 2024pre-release

    Nothing published for this version

  39. 5.13.0-dev.188 Apr 2024pre-release

    Nothing published for this version

  40. 5.13.0-dev.175 Apr 2024pre-release

    Nothing published for this version

  41. 5.13.0-dev.165 Apr 2024pre-release

    Nothing published for this version

  42. 5.13.0-dev.155 Apr 2024pre-release

    Nothing published for this version

  43. 5.13.0-dev.145 Apr 2024pre-release

    Nothing published for this version

  44. 5.13.0-dev.134 Apr 2024pre-release

    Nothing published for this version

  45. 5.13.0-dev.124 Apr 2024pre-release

    Nothing published for this version

  46. 5.13.0-dev.113 Apr 2024pre-release

    Nothing published for this version

  47. 5.13.0-dev.103 Apr 2024pre-release

    Nothing published for this version

  48. 5.13.0-dev.93 Apr 2024pre-release

    Nothing published for this version

  49. 5.13.0-dev.83 Apr 2024pre-release

    Nothing published for this version

  50. 5.13.0-dev.63 Apr 2024pre-release

    Nothing published for this version

  51. 5.13.0-dev.53 Apr 2024pre-release

    Nothing published for this version

  52. 5.13.0-dev.43 Apr 2024pre-release

    Nothing published for this version

  53. 5.13.0-dev.33 Apr 2024pre-release

    Nothing published for this version

  54. 5.13.0-dev.23 Apr 2024pre-release

    Nothing published for this version

  55. 5.13.0-dev.13 Apr 2024pre-release

    Nothing published for this version

  56. 5.12.14 Apr 2024
    Release notes

    Today, we are issuing the 5.12.1 patch release to fix two small problems with our new Cloudflare D1 support.

    Fixes in Prisma CLI

    Windows-only fix for new D1 specific flags for migrate diff and db pull

    The flags --from-local-d1 and --to-local-d1 for migrate diff and --local-d1 to db pull we added in 5.12.0 were not working as expected when running on Windows only. This is now fixed.

    📚 Documentation: Deploying a Cloudflare worker with D1 and Prisma ORM

    New option for migrate diff: -o or --output

    We added a new parameter --output to migrate diff that can be used to provide a filename into which the output of the command will be written. This is particularly useful for Windows users, using PowerShell, as using > to write into a file creates a UTF-16 LE file that can not be read by wrangler d1 migrations apply. Using this new option, this problem can be avoided:

    npx prisma migrate diff --script --from-empty --to-schema-datamodel ./prisma/schema.prisma --output ./schema.sql
    

    Related issues:

    Open source →
  57. 5.12.1-dev.24 Apr 2024pre-release

    Nothing published for this version

  58. 5.12.1-dev.13 Apr 2024pre-release

    Nothing published for this version

  59. 5.12.02 Apr 2024
    Release notes

    Today, we are excited to share the 5.12.0 stable release 🎉

    🌟 Help us spread the word about Prisma by starring the repo or posting on X about the release.

    Highlights

    Cloudflare D1 (Preview)

    This release brings Preview support for Cloudflare D1 with Prisma ORM 🥳

    D1 is Cloudflare’s SQLite database that can be used when deploying applications with Cloudflare.

    When using Prisma ORM with D1, you can continue to: model your database with Prisma schema language, specify sqlite as your database provider in your Prisma schema, and interact with your database using Prisma Client.

    To use Prisma ORM and D1 on Cloudflare Workers or Cloudflare Pages, you need to set sqlite as your database provider and use the @prisma/adapter-d1 database adapter via the driverAdapters Preview feature, released back in version 5.4.0.

    Here is an example of sending a query to your D1 database using Prisma Client in your Worker:

    // src/index.ts file
    import { PrismaClient } from '@prisma/client'
    import { PrismaD1 } from '@prisma/adapter-d1'
    
    // Add the D1Database to the Env interface
    export interface Env {
    // This must match the binding name defined in your wrangler.toml configuration
      DB: D1Database
    }
    
    export default {
      async fetch(
        request: Request,
        env: Env,
        ctx: ExecutionContext
      ): Promise<Response> {
        // Make sure the database name matches the binding name in wrangler.toml and Env interface
        const adapter = new PrismaD1(env.DB)
        // Instantiate PrismaClient using the PrismaD1 driver adapter
        const prisma = new PrismaClient({ adapter })
    
        const users = await prisma.user.findMany()
        const result = JSON.stringify(users)
        return new Response(result)
      },
    }
    

    📚 Documentation: D1 Documentation

    ✍️ Blog post: Build Applications at the Edge with Prisma ORM & Cloudflare D1 (Preview)

    📣 Share your feedback: D1 Driver Adapter

    🚀 Example project: Deploy a Cloudflare Worker with D1

    createMany() for SQLite

    Bringing support for createMany() in SQLite has been a long-awaited feature

    createMany() is a method on Prisma Client, released back in version 2.16.0, that lets you insert multiple records into your database at once. This can be really useful when seeding your database or inserting bulk data.

    Here is an example of using createMany() to create new users:

    const users = await prisma.user.createMany({
      data: [
        { name: 'Sonali', email: '[email protected]' },
        { name: 'Alex', email: '[email protected]' },
        { name: 'Yewande', email: '[email protected]' },
        { name: 'Angelina', email: '[email protected]' },
      ],
    })
    

    Before this release, if you wanted to perform bulk inserts with SQLite, you would have most likely used $queryRawUnsafe to execute raw SQL queries. But now you don’t have to go through all that trouble 🙂

    With SQLite, createMany() works exactly the same way from an API standpoint as it does with other databases except it does not support the skipDuplicates option. At the behavior level, SQLite will split createMany() entries into multiple INSERT queries when the model in your schema contains fields with attributes like @default(dbgenerated()) or @default(autoincrement()) and when the fields are not consistently provided with values across the entries.

    📚Documentation: createMany() - Prisma Client API Reference

    Fixes and Improvements

    Prisma Client

    Credits

    Huge thanks to @yubrot, @skyzh, @anuraaga, @onichandame, @LucianBuzzo, @RobertCraigie, @arthurfiorette, @elithrar for helping!

    Open source →
  60. 5.12.0-integration-publishing.428 Mar 2024pre-release

    Nothing published for this version