diff --git a/content/100-getting-started/02-prisma-orm/100-quickstart/100-prisma-postgres.mdx b/content/100-getting-started/02-prisma-orm/100-quickstart/100-prisma-postgres.mdx index da52288567..16e4365dad 100644 --- a/content/100-getting-started/02-prisma-orm/100-quickstart/100-prisma-postgres.mdx +++ b/content/100-getting-started/02-prisma-orm/100-quickstart/100-prisma-postgres.mdx @@ -96,25 +96,7 @@ This command does a few things: The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/02-prisma-orm/100-quickstart/200-sqlite.mdx b/content/100-getting-started/02-prisma-orm/100-quickstart/200-sqlite.mdx index b5866d0cff..66f3c36a05 100644 --- a/content/100-getting-started/02-prisma-orm/100-quickstart/200-sqlite.mdx +++ b/content/100-getting-started/02-prisma-orm/100-quickstart/200-sqlite.mdx @@ -93,25 +93,7 @@ This command does a few things: The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` and migrations configuration to `prisma.config.ts`: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/02-prisma-orm/100-quickstart/300-postgresql.mdx b/content/100-getting-started/02-prisma-orm/100-quickstart/300-postgresql.mdx index 2a0837fb3c..148e57330f 100644 --- a/content/100-getting-started/02-prisma-orm/100-quickstart/300-postgresql.mdx +++ b/content/100-getting-started/02-prisma-orm/100-quickstart/300-postgresql.mdx @@ -99,25 +99,7 @@ This command does a few things: The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/02-prisma-orm/100-quickstart/400-mysql.mdx b/content/100-getting-started/02-prisma-orm/100-quickstart/400-mysql.mdx index f26f899dc9..6aaae244d8 100644 --- a/content/100-getting-started/02-prisma-orm/100-quickstart/400-mysql.mdx +++ b/content/100-getting-started/02-prisma-orm/100-quickstart/400-mysql.mdx @@ -97,25 +97,7 @@ This command does a few things: The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/02-prisma-orm/100-quickstart/500-sql-server.mdx b/content/100-getting-started/02-prisma-orm/100-quickstart/500-sql-server.mdx index e165e628fb..729d7cc2e5 100644 --- a/content/100-getting-started/02-prisma-orm/100-quickstart/500-sql-server.mdx +++ b/content/100-getting-started/02-prisma-orm/100-quickstart/500-sql-server.mdx @@ -94,25 +94,7 @@ This command does a few things: The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/02-prisma-orm/100-quickstart/600-planetscale.mdx b/content/100-getting-started/02-prisma-orm/100-quickstart/600-planetscale.mdx index 556f9c54bc..83e2a45062 100644 --- a/content/100-getting-started/02-prisma-orm/100-quickstart/600-planetscale.mdx +++ b/content/100-getting-started/02-prisma-orm/100-quickstart/600-planetscale.mdx @@ -98,25 +98,7 @@ This command does a few things: The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/02-prisma-orm/100-quickstart/700-cockroachdb.mdx b/content/100-getting-started/02-prisma-orm/100-quickstart/700-cockroachdb.mdx index 7d8c33bbd7..bc91d3f9b0 100644 --- a/content/100-getting-started/02-prisma-orm/100-quickstart/700-cockroachdb.mdx +++ b/content/100-getting-started/02-prisma-orm/100-quickstart/700-cockroachdb.mdx @@ -93,25 +93,7 @@ This command does a few things: The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/100-prisma-postgres.mdx b/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/100-prisma-postgres.mdx index 46d33f5ba3..5d1fcc12a3 100644 --- a/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/100-prisma-postgres.mdx +++ b/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/100-prisma-postgres.mdx @@ -50,25 +50,7 @@ This command does a few things: The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/200-sqlite.mdx b/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/200-sqlite.mdx index 506ddbbc4c..686f7d2137 100644 --- a/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/200-sqlite.mdx +++ b/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/200-sqlite.mdx @@ -49,25 +49,7 @@ This command does a few things: The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/300-postgresql.mdx b/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/300-postgresql.mdx index 025304d8ff..53c9e0e532 100644 --- a/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/300-postgresql.mdx +++ b/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/300-postgresql.mdx @@ -50,25 +50,7 @@ This command does a few things: The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/400-mysql.mdx b/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/400-mysql.mdx index ada30bc3ff..c391c8dadf 100644 --- a/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/400-mysql.mdx +++ b/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/400-mysql.mdx @@ -48,25 +48,7 @@ This command does a few things: The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/500-sql-server.mdx b/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/500-sql-server.mdx index 31dfe9f393..a8ad5f278a 100644 --- a/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/500-sql-server.mdx +++ b/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/500-sql-server.mdx @@ -49,25 +49,7 @@ This command does a few things: The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/600-planetscale.mdx b/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/600-planetscale.mdx index 73a77b3044..9f0ebb0fe0 100644 --- a/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/600-planetscale.mdx +++ b/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/600-planetscale.mdx @@ -55,25 +55,7 @@ This command does a few things: The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/700-cockroachdb.mdx b/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/700-cockroachdb.mdx index e556f84f32..39e4525f44 100644 --- a/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/700-cockroachdb.mdx +++ b/content/100-getting-started/02-prisma-orm/200-add-to-existing-project/700-cockroachdb.mdx @@ -50,25 +50,7 @@ This command does a few things: The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/03-prisma-postgres/100-from-the-cli.mdx b/content/100-getting-started/03-prisma-postgres/100-from-the-cli.mdx index bfedbb98c6..7b33259e92 100644 --- a/content/100-getting-started/03-prisma-postgres/100-from-the-cli.mdx +++ b/content/100-getting-started/03-prisma-postgres/100-from-the-cli.mdx @@ -94,6 +94,7 @@ Once this command terminated: - A new Prisma Postgres instance was created. - The `prisma/` folder was created with an empty `schema.prisma` file. - The `DATABASE_URL` env var was set in a `.env` file. +- The `prisma.config.ts` file was created with the default configuration. ## 1. Organize your project directory @@ -185,30 +186,12 @@ Here's what each package does: - **`@types/pg`** - TypeScript type definitions for node-postgres - **`dotenv`** - Loads environment variables from your `.env` file -### 2.4. Create prisma.config.ts +### 2.4. Review the generated prisma.config.ts -Create a `prisma.config.ts` file in the root directory for Prisma configuration: +The `prisma init --db` command automatically created a `prisma.config.ts` file that looks like this: ```typescript file=prisma.config.ts -import { defineConfig, env } from 'prisma/config' - -export default defineConfig({ - schema: 'prisma/schema.prisma', - migrations: { - path: 'prisma/migrations', - }, - datasource: { - url: env('DATABASE_URL'), - }, -}) -``` - -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: - -```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/100-getting-started/03-prisma-postgres/100-quickstart/50-prisma-orm.mdx b/content/100-getting-started/03-prisma-postgres/100-quickstart/50-prisma-orm.mdx index bf86530d32..a0c117b29e 100644 --- a/content/100-getting-started/03-prisma-postgres/100-quickstart/50-prisma-orm.mdx +++ b/content/100-getting-started/03-prisma-postgres/100-quickstart/50-prisma-orm.mdx @@ -85,12 +85,10 @@ This command does a few things: - Generates the Prisma Client in the `generated/prisma/` directory - Creates a `prisma.config.ts` file for Prisma configuration -Add `dotenv` to `prisma.config.ts` so that Prisma can load environment variables from your `.env` file: +The generated `prisma.config.ts` file looks like this: ```typescript file=prisma.config.ts -// add-start import 'dotenv/config' -// add-end import { defineConfig, env } from 'prisma/config' export default defineConfig({ diff --git a/content/200-orm/500-reference/250-error-reference.mdx b/content/200-orm/500-reference/250-error-reference.mdx index 7b1d484872..2ac4996a0e 100644 --- a/content/200-orm/500-reference/250-error-reference.mdx +++ b/content/200-orm/500-reference/250-error-reference.mdx @@ -6,6 +6,7 @@ sidebar_label: 'Errors' tocDepth: 3 --- + For more information about how to work with exceptions and error codes, see [Handling exceptions and errors](/orm/prisma-client/debugging-and-troubleshooting/handling-exceptions-and-errors). @@ -282,7 +283,8 @@ Possible P1012 error messages: #### `P2024` -"Timed out fetching a new connection from the connection pool. (More info: [http://pris.ly/d/connection-pool](http://pris.ly/d/connection-pool) (Current connection pool timeout: \{timeout}, connection limit: \{connection_limit})" +"Timed out fetching a new connection from the connection pool. (More info: [http://pris.ly/d/connection-pool](/reference/errors/connection-pool) (Current connection pool timeout: \{timeout}, connection limit: \{connection_limit})" + #### `P2025` @@ -310,7 +312,7 @@ Possible P1012 error messages: #### `P2031` -"Prisma needs to perform transactions, which requires your MongoDB server to be run as a replica set. See details: [https://pris.ly/d/mongodb-replica-set](https://pris.ly/d/mongodb-replica-set)" +"Prisma needs to perform transactions, which requires your MongoDB server to be run as a replica set. See details: [https://pris.ly/d/mongodb-replica-set](/reference/errors/mongodb-replica-set)" #### `P2033` @@ -354,7 +356,7 @@ The Schema Engine was previously called Migration Engine. This change was introd #### `P3003` -"The format of migrations changed, the saved migrations are no longer valid. To solve this problem, please follow the steps at: [https://pris.ly/d/migrate](https://pris.ly/d/migrate)" +"The format of migrations changed, the saved migrations are no longer valid. To solve this problem, please follow the steps at: [https://pris.ly/d/migrate](/reference/errors/migrate)" #### `P3004` @@ -362,7 +364,7 @@ The Schema Engine was previously called Migration Engine. This change was introd #### `P3005` -"The database schema is not empty. Read more about how to baseline an existing production database: [https://pris.ly/d/migrate-baseline](https://pris.ly/d/migrate-baseline)" +"The database schema is not empty. Read more about how to baseline an existing production database: [https://pris.ly/d/migrate-baseline](/reference/errors/migrate-baseline)" #### `P3006` @@ -378,7 +380,7 @@ The Schema Engine was previously called Migration Engine. This change was introd #### `P3009` -"migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: [https://pris.ly/d/migrate-resolve](https://pris.ly/d/migrate-resolve)
\{details}" +"migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: [https://pris.ly/d/migrate-resolve](/reference/errors/migrate-resolve)
\{details}" #### `P3010` @@ -398,7 +400,7 @@ The Schema Engine was previously called Migration Engine. This change was introd #### `P3014` -"Prisma Migrate could not create the shadow database. Please make sure the database user has permission to create databases. Read more about the shadow database (and workarounds) at [https://pris.ly/d/migrate-shadow](https://pris.ly/d/migrate-shadow). +"Prisma Migrate could not create the shadow database. Please make sure the database user has permission to create databases. Read more about the shadow database (and workarounds) at [https://pris.ly/d/migrate-shadow](/reference/errors/migrate-shadow). Original error: \{error_code}
\{inner_error}" @@ -416,23 +418,23 @@ Original error: \{error_code}
\{inner_error}" #### `P3018` -"A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve

Migration name: \{migration_name}

Database error code: \{database_error_code}

Database error:
\{database_error} " +"A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: [https://pris.ly/d/migrate-resolve](/reference/errors/migrate-resolve)"

Migration name: \{migration_name}

Database error code: \{database_error_code}

Database error:
\{database_error} " #### `P3019` -"The datasource provider `{provider}` specified in your schema does not match the one specified in the migration_lock.toml, `{expected_provider}`. Please remove your current migration directory and start a new migration history with prisma migrate dev. Read more: [https://pris.ly/d/migrate-provider-switch](https://pris.ly/d/migrate-provider-switch)" +"The datasource provider `{provider}` specified in your schema does not match the one specified in the migration_lock.toml, `{expected_provider}`. Please remove your current migration directory and start a new migration history with prisma migrate dev. Read more: [https://pris.ly/d/migrate-provider-switch](/reference/errors/migrate-provider-switch)" #### `P3020` -"The automatic creation of shadow databases is disabled on Azure SQL. Please set up a shadow database using the `shadowDatabaseUrl` datasource attribute.
Read the docs page for more details: [https://pris.ly/d/migrate-shadow](https://pris.ly/d/migrate-shadow)" +"The automatic creation of shadow databases is disabled on Azure SQL. Please set up a shadow database using the `shadowDatabaseUrl` datasource attribute.
Read the docs page for more details: [https://pris.ly/d/migrate-shadow](/reference/errors/migrate-shadow)" #### `P3021` -"Foreign keys cannot be created on this database. Learn more how to handle this: [https://pris.ly/d/migrate-no-foreign-keys](https://pris.ly/d/migrate-no-foreign-keys)" +"Foreign keys cannot be created on this database. Learn more how to handle this: [https://pris.ly/d/migrate-no-foreign-keys](/reference/errors/migrate-no-foreign-keys)" #### `P3022` -"Direct execution of DDL (Data Definition Language) SQL statements is disabled on this database. Please read more here about how to handle this: [https://pris.ly/d/migrate-no-direct-ddl](https://pris.ly/d/migrate-no-direct-ddl)" +"Direct execution of DDL (Data Definition Language) SQL statements is disabled on this database. Please read more here about how to handle this: [https://pris.ly/d/migrate-no-direct-ddl](/reference/errors/migrate-no-direct-ddl)" #### `P3023` diff --git a/content/200-orm/500-reference/300-errors/_category_.json b/content/200-orm/500-reference/300-errors/_category_.json new file mode 100644 index 0000000000..b8c63f665b --- /dev/null +++ b/content/200-orm/500-reference/300-errors/_category_.json @@ -0,0 +1,3 @@ +{ + "className": "hidden-sidebar" +} diff --git a/content/200-orm/500-reference/300-errors/connection-pool.mdx b/content/200-orm/500-reference/300-errors/connection-pool.mdx new file mode 100644 index 0000000000..07c372f8eb --- /dev/null +++ b/content/200-orm/500-reference/300-errors/connection-pool.mdx @@ -0,0 +1,9 @@ +--- +slug: /reference/errors/connection-pool +sidebar_class_name: hidden +--- + +import {Redirect} from '@docusaurus/router'; + + + diff --git a/content/200-orm/500-reference/300-errors/migrate-baseline.mdx b/content/200-orm/500-reference/300-errors/migrate-baseline.mdx new file mode 100644 index 0000000000..61d532877e --- /dev/null +++ b/content/200-orm/500-reference/300-errors/migrate-baseline.mdx @@ -0,0 +1,9 @@ +--- +slug: /reference/errors/migrate-baseline +sidebar_class_name: hidden +--- + +import {Redirect} from '@docusaurus/router'; + + + diff --git a/content/200-orm/500-reference/300-errors/migrate-no-direct-ddl.mdx b/content/200-orm/500-reference/300-errors/migrate-no-direct-ddl.mdx new file mode 100644 index 0000000000..8606263dee --- /dev/null +++ b/content/200-orm/500-reference/300-errors/migrate-no-direct-ddl.mdx @@ -0,0 +1,9 @@ +--- +slug: /reference/errors/migrate-no-direct-ddl +sidebar_class_name: hidden +--- + +import {Redirect} from '@docusaurus/router'; + + + diff --git a/content/200-orm/500-reference/300-errors/migrate-no-foreign-keys.mdx b/content/200-orm/500-reference/300-errors/migrate-no-foreign-keys.mdx new file mode 100644 index 0000000000..a8066d086d --- /dev/null +++ b/content/200-orm/500-reference/300-errors/migrate-no-foreign-keys.mdx @@ -0,0 +1,9 @@ +--- +slug: /reference/errors/migrate-no-foreign-keys +sidebar_class_name: hidden +--- + +import {Redirect} from '@docusaurus/router'; + + + diff --git a/content/200-orm/500-reference/300-errors/migrate-provider-switch.mdx b/content/200-orm/500-reference/300-errors/migrate-provider-switch.mdx new file mode 100644 index 0000000000..3a70976723 --- /dev/null +++ b/content/200-orm/500-reference/300-errors/migrate-provider-switch.mdx @@ -0,0 +1,9 @@ +--- +slug: /reference/errors/migrate-provider-switch +sidebar_class_name: hidden +--- + +import {Redirect} from '@docusaurus/router'; + + + diff --git a/content/200-orm/500-reference/300-errors/migrate-resolve.mdx b/content/200-orm/500-reference/300-errors/migrate-resolve.mdx new file mode 100644 index 0000000000..611ad30cac --- /dev/null +++ b/content/200-orm/500-reference/300-errors/migrate-resolve.mdx @@ -0,0 +1,9 @@ +--- +slug: /reference/errors/migrate-resolve +sidebar_class_name: hidden +--- + +import {Redirect} from '@docusaurus/router'; + + + diff --git a/content/200-orm/500-reference/300-errors/migrate-shadow.mdx b/content/200-orm/500-reference/300-errors/migrate-shadow.mdx new file mode 100644 index 0000000000..66939ea76f --- /dev/null +++ b/content/200-orm/500-reference/300-errors/migrate-shadow.mdx @@ -0,0 +1,9 @@ +--- +slug: /reference/errors/migrate-shadow +sidebar_class_name: hidden +--- + +import {Redirect} from '@docusaurus/router'; + + + diff --git a/content/200-orm/500-reference/300-errors/migrate.mdx b/content/200-orm/500-reference/300-errors/migrate.mdx new file mode 100644 index 0000000000..6b4020c380 --- /dev/null +++ b/content/200-orm/500-reference/300-errors/migrate.mdx @@ -0,0 +1,9 @@ +--- +slug: /reference/errors/migrate +sidebar_class_name: hidden +--- + +import {Redirect} from '@docusaurus/router'; + + + diff --git a/content/200-orm/500-reference/300-errors/mongodb-replica-set.mdx b/content/200-orm/500-reference/300-errors/mongodb-replica-set.mdx new file mode 100644 index 0000000000..1e5900f21a --- /dev/null +++ b/content/200-orm/500-reference/300-errors/mongodb-replica-set.mdx @@ -0,0 +1,9 @@ +--- +slug: /reference/errors/mongodb-replica-set +sidebar_class_name: hidden +--- + +import {Redirect} from '@docusaurus/router'; + + + diff --git a/content/250-postgres/300-database/750-serverless-driver.mdx b/content/250-postgres/300-database/750-serverless-driver.mdx index 6423a1c290..74e64f96c8 100644 --- a/content/250-postgres/300-database/750-serverless-driver.mdx +++ b/content/250-postgres/300-database/750-serverless-driver.mdx @@ -321,6 +321,7 @@ try { - Requires a Prisma Postgres instance and does not work with [local development](/postgres/database/local-development) databases - Currently in Early Access and not yet recommended for production +- Connection pooling is not currently supported and is planned to be supported when [`@prisma/ppg`](https://www.npmjs.com/package/@prisma/ppg) reaches [General Availability](https://www.prisma.io/docs/orm/more/releases#generally-available-ga) ## Learn more diff --git a/content/800-guides/050-migrate-from-mongoose.mdx b/content/800-guides/050-migrate-from-mongoose.mdx index 534abe4988..b1be2dcfd1 100644 --- a/content/800-guides/050-migrate-from-mongoose.mdx +++ b/content/800-guides/050-migrate-from-mongoose.mdx @@ -10,7 +10,7 @@ community_section: true ## Introduction -This guide shows you how to migrate your application from Mongoose to Prisma ORM. We'll use an extended version of the [Mongoose Express example](https://github.com/Automattic/mongoose/tree/master/examples/express) as a [sample project](https://github.com/prisma/migrate-from-mongoose-to-prisma) to demonstrate the migration steps. +This guide shows you how to migrate your application from Mongoose to Prisma ORM. We'll use a [sample project](https://github.com/prisma/migrate-from-mongoose-to-prisma) to demonstrate the migration steps. :::warning[MongoDB support for Prisma ORM v7] diff --git a/content/800-guides/370-bun.mdx b/content/800-guides/370-bun.mdx index 7565541312..2f44304b09 100644 --- a/content/800-guides/370-bun.mdx +++ b/content/800-guides/370-bun.mdx @@ -309,7 +309,7 @@ Bun executables are useful for: ## Next steps -You can explore the [sample app here](https://pris.ly/bun-guide-example) to see what you will build by following this guide. If you would like to add caching to your application, check out [this example](https://pris.ly/bun_ppg_example). +You can explore [this example](https://pris.ly/bun_ppg_example) to see a sample application built with Bun and Prisma. Now that you have a Bun application connected to a Prisma Postgres database, you can continue by: diff --git a/package-lock.json b/package-lock.json index c95d62549a..58ed38354c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -248,7 +248,6 @@ "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.40.0.tgz", "integrity": "sha512-nlr/MMgoLNUHcfWC5Ns2ENrzKx9x51orPc6wJ8Ignv1DsrUmKm0LUih+Tj3J+kxYofzqQIQRU495d4xn3ozMbg==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/client-common": "5.40.0", "@algolia/requester-browser-xhr": "5.40.0", @@ -374,7 +373,6 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz", "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==", "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.3", @@ -2315,7 +2313,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -2338,7 +2335,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=18" } @@ -2448,7 +2444,6 @@ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "license": "MIT", - "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -2870,7 +2865,6 @@ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "license": "MIT", - "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -3553,7 +3547,6 @@ "resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-3.9.2.tgz", "integrity": "sha512-HbjwKeC+pHUFBfLMNzuSjqFE/58+rLVKmOU3lxQrpsxLBOGosYco/Q0GduBb0/jEMRiyEqjNT/01rRdOMWq5pw==", "license": "MIT", - "peer": true, "dependencies": { "@docusaurus/babel": "3.9.2", "@docusaurus/bundler": "3.9.2", @@ -3630,7 +3623,6 @@ "resolved": "https://registry.npmjs.org/@docusaurus/faster/-/faster-3.9.2.tgz", "integrity": "sha512-DEVIwhbrZZ4ir31X+qQNEQqDWkgCJUV6kiPPAd2MGTY8n5/n0c4B8qA5k1ipF2izwH00JEf0h6Daaut71zzkyw==", "license": "MIT", - "peer": true, "dependencies": { "@docusaurus/types": "3.9.2", "@rspack/core": "^1.5.0", @@ -3759,7 +3751,6 @@ "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.9.2.tgz", "integrity": "sha512-C5wZsGuKTY8jEYsqdxhhFOe1ZDjH0uIYJ9T/jebHwkyxqnr4wW0jTkB72OMqNjsoQRcb0JN3PcSeTwFlVgzCZg==", "license": "MIT", - "peer": true, "dependencies": { "@docusaurus/core": "3.9.2", "@docusaurus/logger": "3.9.2", @@ -5540,7 +5531,6 @@ "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.1.tgz", "integrity": "sha512-f++rKLQgUVYDAtECQ6fn/is15GkEH9+nZPM3MS0RcxVqoTfawHvDlSCH7JbMhAM6uJ32v3eXLvLmLvjGu7PTQw==", "license": "MIT", - "peer": true, "dependencies": { "@types/mdx": "^2.0.0" }, @@ -6761,7 +6751,6 @@ "resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz", "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", "license": "MIT", - "peer": true, "dependencies": { "@babel/core": "^7.21.3", "@svgr/babel-preset": "8.1.0", @@ -6866,7 +6855,6 @@ "integrity": "sha512-WezcBo8a0Dg2rnR82zhwoR6aRNxeTGfK5QCD6TQ+kg3xx/zNT02s/0o+81h/3zhvFSB24NtqEr8FTw88O5W/JQ==", "hasInstallScript": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "@swc/counter": "^0.1.3", "@swc/types": "^0.1.24" @@ -7556,7 +7544,6 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.2.tgz", "integrity": "sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA==", "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.0.2" } @@ -7916,7 +7903,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -8002,7 +7988,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -8048,7 +8033,6 @@ "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.40.0.tgz", "integrity": "sha512-a9aIL2E3Z7uYUPMCmjMFFd5MWhn+ccTubEvnMy7rOTZCB62dXBJtz0R5BZ/TPuX3R9ocBsgWuAbGWQ+Ph4Fmlg==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/abtesting": "1.6.0", "@algolia/client-abtesting": "5.40.0", @@ -8560,7 +8544,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.25", "caniuse-lite": "^1.0.30001754", @@ -9593,7 +9576,6 @@ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "license": "MIT", - "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -11162,7 +11144,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -16336,7 +16317,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -17017,7 +16997,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -17921,7 +17900,6 @@ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", "license": "MIT", - "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -18758,7 +18736,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.0.tgz", "integrity": "sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -18768,7 +18745,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.0.tgz", "integrity": "sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ==", "license": "MIT", - "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -18824,7 +18800,6 @@ "resolved": "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-6.0.0.tgz", "integrity": "sha512-YMMxTUQV/QFSnbgrP3tjDzLHRg7vsbMn8e9HAa8o/1iXoiomo48b7sk/kkmWEuWNDPJVlKSJRB6Y2fHqdJk+SQ==", "license": "MIT", - "peer": true, "dependencies": { "@types/react": "*" }, @@ -18853,7 +18828,6 @@ "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.3.4.tgz", "integrity": "sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.12.13", "history": "^4.9.0", @@ -19651,7 +19625,6 @@ "resolved": "https://registry.npmjs.org/sass/-/sass-1.93.2.tgz", "integrity": "sha512-t+YPtOQHpGW1QWsh1CHQ5cPIr9lbbGZLZnbihP/D/qZj/yuV68m8qarcV17nvkOX81BCrvzAlq2klCQFZghyTg==", "license": "MIT", - "peer": true, "dependencies": { "chokidar": "^4.0.0", "immutable": "^5.0.2", @@ -20964,8 +20937,7 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD", - "peer": true + "license": "0BSD" }, "node_modules/type-fest": { "version": "2.19.0", @@ -21028,7 +21000,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "devOptional": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -21065,7 +21036,6 @@ "integrity": "sha512-Wj7/AMtE9MRnAXa6Su3Lk0LNCfqDYgfwVjwRFVum9U7wsto1imuHqk4kTm7Jni+5A0Hn7dttL6O/zjvUvoo+8A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "defu": "^6.1.4", "exsolve": "^1.0.7", @@ -21445,7 +21415,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -21667,7 +21636,6 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.102.1.tgz", "integrity": "sha512-7h/weGm9d/ywQ6qzJ+Xy+r9n/3qgp/thalBbpOi5i223dPXKi04IBtqPN9nTd+jBc7QKfvDbaBnFipYp4sJAUQ==", "license": "MIT", - "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", @@ -22095,7 +22063,6 @@ "dev": true, "hasInstallScript": true, "license": "Apache-2.0", - "peer": true, "bin": { "workerd": "bin/workerd" }, @@ -22362,7 +22329,6 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz", "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==", "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/static/_redirects b/static/_redirects index 6980e8fee5..73e15e9f5e 100644 --- a/static/_redirects +++ b/static/_redirects @@ -309,6 +309,7 @@ /getting-started/setup-prisma/add-to-existing-project/relational-databases/install-prisma-client-typescript-mysql* /docs/getting-started/prisma-orm/add-to-existing-project/mysql /getting-started/setup-prisma/add-to-existing-project/relational-databases/install-prisma-client-typescript-planetscale* /docs/getting-started/prisma-orm/add-to-existing-project/planetscale /getting-started/setup-prisma/add-to-existing-project/relational-databases/install-prisma-client-typescript-postgresql* /docs/getting-started/prisma-orm/add-to-existing-project/postgresql +/getting-started/setup-prisma/add-to-existing-project/relational-databases/install-prisma-client-typescript-prismaPostgres* /docs/getting-started/prisma-orm/add-to-existing-project/prisma-postgres /getting-started/setup-prisma/add-to-existing-project/relational-databases/install-prisma-client-typescript-sqlserver* /docs/getting-started/prisma-orm/add-to-existing-project/sql-server @@ -829,4 +830,15 @@ /postgres/introduction/import-from-existing-database* /docs/getting-started/prisma-postgres/import-from-existing-database-postgresql +# Error message reference redirects +/reference/errors/connection-pool /docs/orm/prisma-client/setup-and-configuration/databases-connections/connection-pool +/reference/errors/migrate /docs/orm/prisma-migrate/understanding-prisma-migrate/overview +/reference/errors/migrate-no-direct-ddl /docs/orm/overview/databases/planetscale#how-to-use-branches-and-deploy-requests +/reference/errors/migrate-no-foreign-keys /docs/orm/overview/databases/planetscale#option-1-emulate-relations-in-prisma-client +/reference/errors/migrate-provider-switch /docs/orm/prisma-migrate/understanding-prisma-migrate/limitations-and-known-issues#you-cannot-automatically-switch-database-providers +/reference/errors/migrate-resolve /docs/orm/prisma-migrate/workflows/patching-and-hotfixing#failed-migration +/reference/errors/migrate-shadow /docs/orm/prisma-migrate/understanding-prisma-migrate/shadow-database + + ### NO REDIRECTS BELOW THIS LINE. ADD REDIRECTS ABOVE THIS SECTION ### +