You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/200-orm/200-prisma-client/100-queries/100-query-optimization-performance.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ async function getUsers() {
93
93
}
94
94
```
95
95
96
-
For serverless development environments with frameworks that use HMR (Hot Module Replacement), ensure you properly handle a [single instance of Prisma in development](/orm/more/help-and-troubleshooting/help-articles/nextjs-prisma-client-dev-practices).
96
+
For serverless development environments with frameworks that use HMR (Hot Module Replacement), ensure you properly handle a [single instance of Prisma in development](/orm/more/help-and-troubleshooting/nextjs-help#best-practices-for-using-prisma-client-in-development).
Copy file name to clipboardExpand all lines: content/200-orm/300-prisma-migrate/200-understanding-prisma-migrate/600-legacy-migrate.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,7 +197,7 @@ The following table shows which SQL operations are currently supported by legacy
197
197
| Create indexes |`CREATE INDEX`| ✔️ |
198
198
| Cascading deletes |`ON DELETE`| No (workaround: manually add in SQL and introspect) |
199
199
| Cascading updates |`ON UPDATE`| No |
200
-
| Data validation |`CHECK`| No ([workaround](/orm/more/help-and-troubleshooting/help-articles/check-constraints)) |
200
+
| Data validation |`CHECK`| No ([workaround](/orm/more/help-and-troubleshooting/check-constraints)) |
201
201
202
202
Note that this table assumes that the operation is also supported by the underlying database. For example, `ENUM` is not supported in SQLite. This means that you also can't use `enum` when using legacy Prisma Migrate.
Copy file name to clipboardExpand all lines: content/200-orm/500-reference/050-prisma-client-reference.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3502,7 +3502,7 @@ const result = await prisma.user.update({
3502
3502
<Admonition type="info">
3503
3503
3504
3504
- From version 4.3.0, you can also use these operators to compare _fields_ in the same model [with the `<model>.fields` property](#compare-columns-in-the-same-table).
3505
-
- In versions before 4.3.0, you can compare fields in the same model [with raw queries](/orm/more/help-and-troubleshooting/help-articles/comparing-columns-through-raw-queries).
3505
+
- In versions before 4.3.0, you can compare fields in the same model [with raw queries](/orm/more/help-and-troubleshooting/comparing-columns-through-raw-queries).
3506
3506
3507
3507
</Admonition>
3508
3508
@@ -5525,7 +5525,7 @@ This feature was moved to general availability in version 5.0.0 and was availabl
5525
5525
5526
5526
<Admonition type="info">
5527
5527
5528
-
In the following situations, you must [use raw queries to compare columns in the same table](/orm/more/help-and-troubleshooting/help-articles/comparing-columns-through-raw-queries):
5528
+
In the following situations, you must [use raw queries to compare columns in the same table](/orm/more/help-and-troubleshooting/comparing-columns-through-raw-queries):
5529
5529
5530
5530
- If you use a version earlier than 4.3.0
5531
5531
- If you want to use a unique filter, such as [`findUnique`](#findunique) or [`findUniqueOrThrow`](#finduniqueorthrow)
Copy file name to clipboardExpand all lines: content/200-orm/800-more/600-help-and-troubleshooting/400-nextjs-help.mdx
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
-
title: "Comprehensive Guide to Using Prisma with Next.js"
3
-
description: "Learn best practices, monorepo strategies, and dynamic usage techniques for Prisma in Next.js applications."
2
+
title: "Comprehensive Guide to Using Prisma ORM with Next.js"
3
+
sidebar_label: "Using Prisma ORM with Next.js"
4
+
description: "Learn best practices, monorepo strategies, and dynamic usage techniques for Prisma ORM in Next.js applications."
4
5
tags:
5
6
- Prisma
6
7
- Next.js
@@ -10,7 +11,7 @@ tags:
10
11
- Best Practices
11
12
---
12
13
13
-
Prisma and Next.js form a powerful combination for building modern, server-side rendered, and API-driven web applications. This guide consolidates various tips and strategies to help you maximize their potential. Whether you’re looking for best practices, monorepo setup guidance, or strategies for dynamic usage, we’ve got you covered.
14
+
Prisma ORM and Next.js form a powerful combination for building modern, server-side rendered, and API-driven web applications. This guide consolidates various tips and strategies to help you maximize their potential. Whether you’re looking for best practices, monorepo setup guidance, or strategies for dynamic usage, we’ve got you covered.
14
15
15
16
---
16
17
@@ -44,21 +45,21 @@ Using this approach ensures that only one instance of Prisma Client exists, even
44
45
45
46
---
46
47
47
-
## Setting Up Prisma in a Monorepo
48
+
## Setting Up Prisma ORM in a Monorepo
48
49
49
-
### Challenges of Using Prisma in Monorepos
50
+
### Challenges of Using Prisma ORM in Monorepos
50
51
51
-
Monorepos allow multiple projects to share code and dependencies, making them a popular choice for modern development. However, using Prisma in a monorepo can present challenges related to dependency resolution and schema management.
52
+
Monorepos allow multiple projects to share code and dependencies, making them a popular choice for modern development. However, using Prisma ORM in a monorepo can present challenges related to dependency resolution and schema management.
52
53
53
54
#### Key Issues
54
55
55
-
1.**Dependency Resolution**: Multiple packages in a monorepo might lead to conflicts if they use different Prisma versions.
56
-
2.**Schema Centralization**: Managing a single Prisma schema across multiple projects can be complex.
56
+
1.**Dependency Resolution**: Multiple packages in a monorepo might lead to conflicts if they use different version of Prisma ORM.
57
+
2.**Schema Centralization**: Managing a single Prisma Schema across multiple projects can be complex.
57
58
58
59
#### Best Practices for Monorepo Integration
59
60
60
61
-**Centralize the Prisma Schema**: Place the `schema.prisma` file in a shared package, such as `@myorg/db`, to ensure consistency.
61
-
-**Install Dependencies in the Root**: Avoid version conflicts by installing Prisma dependencies at the root of the monorepo.
62
+
-**Install Dependencies in the Root**: Avoid version conflicts by installing Prisma ORM as a dependency at the root of the monorepo.
62
63
-**Use NPM Scripts for Generation**:
63
64
64
65
```json
@@ -69,15 +70,15 @@ Monorepos allow multiple projects to share code and dependencies, making them a
69
70
}
70
71
```
71
72
72
-
This approach keeps your Prisma schema and generated client in sync across all projects in the monorepo.
73
+
This approach keeps your Prisma Schema and generated client in sync across all projects in the monorepo.
73
74
74
75
---
75
76
76
77
## Dynamic Usage of Prisma Client in Next.js
77
78
78
79
### Handling Dynamic Scenarios
79
80
80
-
Dynamic use cases, such as working with tenant-specific databases, require additional consideration when using Prisma with Next.js.
81
+
Dynamic use cases, such as working with tenant-specific databases, require additional consideration when using Prisma ORM with Next.js.
Copy file name to clipboardExpand all lines: content/200-orm/800-more/600-help-and-troubleshooting/900-prisma-nuxt-module.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ This module provides several features to streamline the setup and usage of Prism
34
34
<br />
35
35
:::warning
36
36
37
-
If you're using `pnpm`, make sure to hoist Prisma dependencies. Follow the steps [here](/orm/more/help-and-troubleshooting/help-articles/prisma-nuxt-module#prisma-studio-not-opening-with-pnpm) for detailed instructions.
37
+
If you're using `pnpm`, make sure to hoist Prisma dependencies. Follow the [Prisma studio steps](#prisma-studio-not-opening-with-pnpm) for detailed instructions.
0 commit comments