Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 18 additions & 18 deletions apps/docs/content/docs.v6/(index)/index.mdx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
title: Get Started
description: Welcome to Prisma! Choose your path below to get started.
url: /v6
url: /docs/v6
metaTitle: Get started with Prisma
metaDescription: 'Build data-driven applications with ease using Prisma ORM, add connection pooling with Prisma Postgres.'
---

## Prisma ORM

[**Prisma ORM**](/v6/orm/overview/introduction/what-is-prisma) is an open-source ORM that provides fast, type-safe access to Postgres, MySQL, SQLite, and more databases.
[**Prisma ORM**](/docs/v6/orm/overview/introduction/what-is-prisma) is an open-source ORM that provides fast, type-safe access to Postgres, MySQL, SQLite, and more databases.

```npm
npx prisma init --db
```

## Prisma Postgres

[**Prisma Postgres**](/v6/postgres) is a fully managed PostgreSQL database that scales to zero, integrates with Prisma ORM and Prisma Studio.
[**Prisma Postgres**](/docs/v6/postgres) is a fully managed PostgreSQL database that scales to zero, integrates with Prisma ORM and Prisma Studio.

```npm
npx create-db
Expand All @@ -28,7 +28,7 @@ npx create-db

The fastest way to set up **Prisma ORM** with a ready-to-use **Prisma Postgres** database.

[**Start Quickstart →**](/v6/prisma-orm/quickstart/prisma-postgres)
[**Start Quickstart →**](/docs/v6/prisma-orm/quickstart/prisma-postgres)

---

Expand All @@ -38,13 +38,13 @@ Set up Prisma ORM with your existing database:

| Database | Guide |
| ----------- | --------------------------------------------------------------------------- |
| PostgreSQL | [Get started →](/v6/prisma-orm/quickstart/postgresql) |
| MySQL | [Get started →](/v6/prisma-orm/quickstart/mysql) |
| SQL Server | [Get started →](/v6/prisma-orm/quickstart/sql-server) |
| SQLite | [Get started →](/v6/prisma-orm/quickstart/sqlite) |
| MongoDB | [Get started →](/v6/prisma-orm/quickstart/mongodb) |
| PlanetScale | [Get started →](/v6/prisma-orm/quickstart/planetscale) |
| CockroachDB | [Get started →](/v6/prisma-orm/quickstart/cockroachdb) |
| PostgreSQL | [Get started →](/docs/v6/prisma-orm/quickstart/postgresql) |
| MySQL | [Get started →](/docs/v6/prisma-orm/quickstart/mysql) |
| SQL Server | [Get started →](/docs/v6/prisma-orm/quickstart/sql-server) |
| SQLite | [Get started →](/docs/v6/prisma-orm/quickstart/sqlite) |
| MongoDB | [Get started →](/docs/v6/prisma-orm/quickstart/mongodb) |
| PlanetScale | [Get started →](/docs/v6/prisma-orm/quickstart/planetscale) |
| CockroachDB | [Get started →](/docs/v6/prisma-orm/quickstart/cockroachdb) |

---

Expand All @@ -54,17 +54,17 @@ Working with a popular framework? You can easily add Prisma to your setup:

| Framework | Guide |
| -------------- | ----------------------------------------------- |
| Next.js | [Get started →](/v6/guides/nextjs) |
| Nuxt.js | [Get started →](/v6/guides/nuxt) |
| Astro | [Get started →](/v6/guides/astro) |
| SvelteKit | [Get started →](/v6/guides/sveltekit) |
| React Router 7 | [Get started →](/v6/guides/react-router-7) |
| TanStack Start | [Get started →](/v6/guides/tanstack-start) |
| Next.js | [Get started →](/docs/v6/guides/nextjs) |
| Nuxt.js | [Get started →](/docs/v6/guides/nuxt) |
| Astro | [Get started →](/docs/v6/guides/astro) |
| SvelteKit | [Get started →](/docs/v6/guides/sveltekit) |
| React Router 7 | [Get started →](/docs/v6/guides/react-router-7) |
| TanStack Start | [Get started →](/docs/v6/guides/tanstack-start) |

---

## Add to Existing Project

Already have a project? Add Prisma ORM to your existing application:

[**Add to Existing Project →**](/v6/prisma-orm/add-to-existing-project/prisma-postgres)
[**Add to Existing Project →**](/docs/v6/prisma-orm/add-to-existing-project/prisma-postgres)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: CockroachDB
description: 'Add Prisma ORM to an existing TypeScript project with CockroachDB and learn database introspection, baselining, and querying.'
url: /v6/prisma-orm/add-to-existing-project/cockroachdb
url: /docs/v6/prisma-orm/add-to-existing-project/cockroachdb
metaTitle: How to add Prisma ORM to an existing project using CockroachDB (15 min)
metaDescription: 'Add Prisma ORM to an existing TypeScript project with CockroachDB and learn database introspection, baselining, and querying.'
---
Expand All @@ -26,14 +26,14 @@ Here's what each package does:

- **`prisma`** - The Prisma CLI for running commands like `prisma init`, `prisma db pull`, and `prisma generate`
- **`@prisma/client`** - The Prisma Client library for querying your database
- **`@prisma/adapter-pg`** - The [`node-postgres` driver adapter](/v6/orm/overview/databases/postgresql#using-the-node-postgres-driver) that connects Prisma Client to your database (CockroachDB is PostgreSQL-compatible)
- **`@prisma/adapter-pg`** - The [`node-postgres` driver adapter](/docs/v6/orm/overview/databases/postgresql#using-the-node-postgres-driver) that connects Prisma Client to your database (CockroachDB is PostgreSQL-compatible)
- **`pg`** - The node-postgres database driver
- **`@types/pg`** - TypeScript type definitions for node-postgres
- **`dotenv`** - Loads environment variables from your `.env` file

## 2. Initialize Prisma ORM

Set up your Prisma ORM project by creating your [Prisma Schema](/v6/orm/prisma-schema/overview) file with the following command:
Set up your Prisma ORM project by creating your [Prisma Schema](/docs/v6/orm/prisma-schema/overview) file with the following command:

```npm
npx prisma init --datasource-provider cockroachdb --output ../generated/prisma
Expand Down Expand Up @@ -62,7 +62,7 @@ export default defineConfig({
});
```

The generated schema uses [the ESM-first `prisma-client` generator](/v6/orm/prisma-schema/overview/generators#prisma-client) with a custom output path:
The generated schema uses [the ESM-first `prisma-client` generator](/docs/v6/orm/prisma-schema/overview/generators#prisma-client) with a custom output path:

```prisma title="prisma/schema.prisma"
generator client {
Expand All @@ -83,7 +83,7 @@ Update the `.env` file with your CockroachDB connection URL:
DATABASE_URL="postgresql://user:password@host:26257/mydb?sslmode=require"
```

The [format of the connection URL](/v6/orm/reference/connection-urls) for CockroachDB looks as follows:
The [format of the connection URL](/docs/v6/orm/reference/connection-urls) for CockroachDB looks as follows:

```
postgresql://USER:PASSWORD@HOST:PORT/DATABASE?sslmode=require
Expand All @@ -105,7 +105,7 @@ After introspection, your Prisma schema will contain models that represent your

## 5. Baseline your database

To use Prisma Migrate with your existing database, you need to [baseline your database](/v6/orm/prisma-migrate/getting-started).
To use Prisma Migrate with your existing database, you need to [baseline your database](/docs/v6/orm/prisma-migrate/getting-started).

First, create a `migrations` directory:

Expand Down Expand Up @@ -229,13 +229,13 @@ This command will:

Explore the options suggested by [CockroachDB](https://www.cockroachlabs.com/blog/cockroachdb-gui-options/) to view and manage your data.

[Prisma Studio](/v6/orm/tools/prisma-studio) does not currently support CockroachDB. Support may be added in a future release. See [Databases supported by Prisma Studio](/v6/orm/tools/prisma-studio#databases-supported-by-prisma-studio) for more information.
[Prisma Studio](/docs/v6/orm/tools/prisma-studio) does not currently support CockroachDB. Support may be added in a future release. See [Databases supported by Prisma Studio](/docs/v6/orm/tools/prisma-studio#databases-supported-by-prisma-studio) for more information.

## Next steps

## More info

- [CockroachDB database connector](/v6/orm/overview/databases/cockroachdb)
- [Prisma Config reference](/v6/orm/reference/prisma-config-reference)
- [Database introspection](/v6/orm/prisma-schema/introspection)
- [Prisma Migrate](/v6/orm/prisma-migrate/getting-started)
- [CockroachDB database connector](/docs/v6/orm/overview/databases/cockroachdb)
- [Prisma Config reference](/docs/v6/orm/reference/prisma-config-reference)
- [Database introspection](/docs/v6/orm/prisma-schema/introspection)
- [Prisma Migrate](/docs/v6/orm/prisma-migrate/getting-started)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: MongoDB
description: Add Prisma ORM to an existing TypeScript project with MongoDB and learn database introspection and querying.
url: /v6/prisma-orm/add-to-existing-project/mongodb
url: /docs/v6/prisma-orm/add-to-existing-project/mongodb
metaTitle: How to add Prisma ORM to an existing project using MongoDB (15 min)
metaDescription: Add Prisma ORM to an existing TypeScript project with MongoDB and learn database introspection and querying.
---
Expand All @@ -18,15 +18,15 @@ This guide uses Prisma ORM v6.19 to ensure full compatibility with MongoDB.

:::tip

If you're migrating to Prisma ORM from Mongoose, see our [Migrate from Mongoose guide](/v6/guides/migrate-from-mongoose).
If you're migrating to Prisma ORM from Mongoose, see our [Migrate from Mongoose guide](/docs/v6/guides/migrate-from-mongoose).

:::

## Prerequisites

In order to successfully complete this guide, you need:

- [Node.js](https://nodejs.org/en/) installed on your machine (see [system requirements](/v6/orm/more/upgrades/to-v7#minimum-supported-nodejs--typescript-versions) for officially supported versions)
- [Node.js](https://nodejs.org/en/) installed on your machine (see [system requirements](/docs/v6/orm/more/upgrades/to-v7#minimum-supported-nodejs--typescript-versions) for officially supported versions)
- An existing TypeScript project with a `package.json` file
- Access to a MongoDB 4.2+ server with a replica set deployment. We recommend using [MongoDB Atlas](https://www.mongodb.com/cloud/atlas).

Expand All @@ -36,7 +36,7 @@ The MongoDB database connector uses transactions to support nested writes. Trans

:::

Make sure you have your database [connection URL](/v6/orm/reference/connection-urls) (that includes your authentication credentials) at hand!
Make sure you have your database [connection URL](/docs/v6/orm/reference/connection-urls) (that includes your authentication credentials) at hand!

:::note

Expand Down Expand Up @@ -72,7 +72,7 @@ You can also install `prisma@6` and `@prisma/client@6` to automatically get the

## 2. Initialize Prisma ORM

Set up your Prisma ORM project by creating your [Prisma Schema](/v6/orm/prisma-schema/overview) file with the following command:
Set up your Prisma ORM project by creating your [Prisma Schema](/docs/v6/orm/prisma-schema/overview) file with the following command:

```npm
npx prisma init --datasource-provider mongodb --output ../generated/prisma
Expand Down Expand Up @@ -119,7 +119,7 @@ export default defineConfig({
});
```

The generated schema uses [the ESM-first `prisma-client` generator](/v6/orm/prisma-schema/overview/generators#prisma-client) with a custom output path:
The generated schema uses [the ESM-first `prisma-client` generator](/docs/v6/orm/prisma-schema/overview/generators#prisma-client) with a custom output path:

```prisma title="prisma/schema.prisma"
generator client {
Expand Down Expand Up @@ -311,12 +311,12 @@ MongoDB uses a flexible schema model. Prisma Migrate (which creates migration fi

You can use [MongoDB Atlas](https://www.mongodb.com/cloud/atlas), the MongoDB shell, or MongoDB Compass to view and manage your data.

[Prisma Studio](/v6/orm/tools/prisma-studio) does not currently support MongoDB. Support may be added in a future release. See [Databases supported by Prisma Studio](/v6/orm/tools/prisma-studio#databases-supported-by-prisma-studio) for more information.
[Prisma Studio](/docs/v6/orm/tools/prisma-studio) does not currently support MongoDB. Support may be added in a future release. See [Databases supported by Prisma Studio](/docs/v6/orm/tools/prisma-studio#databases-supported-by-prisma-studio) for more information.

## Next steps

## More info

- [MongoDB database connector](/v6/orm/overview/databases/mongodb)
- [Prisma Config reference](/v6/orm/reference/prisma-config-reference)
- [Database introspection](/v6/orm/prisma-schema/introspection)
- [MongoDB database connector](/docs/v6/orm/overview/databases/mongodb)
- [Prisma Config reference](/docs/v6/orm/reference/prisma-config-reference)
- [Database introspection](/docs/v6/orm/prisma-schema/introspection)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: MySQL
description: 'Add Prisma ORM to an existing TypeScript project with MySQL and learn database introspection, baselining, and querying.'
url: /v6/prisma-orm/add-to-existing-project/mysql
url: /docs/v6/prisma-orm/add-to-existing-project/mysql
metaTitle: How to add Prisma ORM to an existing project using MySQL (15 min)
metaDescription: 'Add Prisma ORM to an existing TypeScript project with MySQL and learn database introspection, baselining, and querying.'
---
Expand Down Expand Up @@ -31,7 +31,7 @@ Here's what each package does:

## 2. Initialize Prisma ORM

Set up your Prisma ORM project by creating your [Prisma Schema](/v6/orm/prisma-schema/overview) file with the following command:
Set up your Prisma ORM project by creating your [Prisma Schema](/docs/v6/orm/prisma-schema/overview) file with the following command:

```npm
npx prisma init --datasource-provider mysql --output ../generated/prisma
Expand Down Expand Up @@ -60,7 +60,7 @@ export default defineConfig({
});
```

The generated schema uses [the ESM-first `prisma-client` generator](/v6/orm/prisma-schema/overview/generators#prisma-client) with a custom output path:
The generated schema uses [the ESM-first `prisma-client` generator](/docs/v6/orm/prisma-schema/overview/generators#prisma-client) with a custom output path:

```prisma title="prisma/schema.prisma"
generator client {
Expand Down Expand Up @@ -109,7 +109,7 @@ After introspection, your Prisma schema will contain models that represent your

## 5. Baseline your database

To use Prisma Migrate with your existing database, you need to [baseline your database](/v6/orm/prisma-migrate/getting-started).
To use Prisma Migrate with your existing database, you need to [baseline your database](/docs/v6/orm/prisma-migrate/getting-started).

First, create a `migrations` directory:

Expand Down Expand Up @@ -239,7 +239,7 @@ This command will:

## More info

- [MySQL database connector](/v6/orm/overview/databases/mysql)
- [Prisma Config reference](/v6/orm/reference/prisma-config-reference)
- [Database introspection](/v6/orm/prisma-schema/introspection)
- [Prisma Migrate](/v6/orm/prisma-migrate/getting-started)
- [MySQL database connector](/docs/v6/orm/overview/databases/mysql)
- [Prisma Config reference](/docs/v6/orm/reference/prisma-config-reference)
- [Database introspection](/docs/v6/orm/prisma-schema/introspection)
- [Prisma Migrate](/docs/v6/orm/prisma-migrate/getting-started)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: PlanetScale
description: Add Prisma ORM to an existing TypeScript project with PlanetScale MySQL and learn database introspection and querying.
url: /v6/prisma-orm/add-to-existing-project/planetscale
url: /docs/v6/prisma-orm/add-to-existing-project/planetscale
metaTitle: How to add Prisma ORM to an existing project using PlanetScale MySQL (15 min)
metaDescription: Add Prisma ORM to an existing TypeScript project with PlanetScale MySQL and learn database introspection and querying.
---
Expand All @@ -10,7 +10,7 @@ metaDescription: Add Prisma ORM to an existing TypeScript project with PlanetSca

:::note

PlanetScale also offers PostgreSQL databases. If you're using **PlanetScale PostgreSQL**, follow the [Add to existing PostgreSQL project guide](/v6/prisma-orm/add-to-existing-project/postgresql) instead.
PlanetScale also offers PostgreSQL databases. If you're using **PlanetScale PostgreSQL**, follow the [Add to existing PostgreSQL project guide](/docs/v6/prisma-orm/add-to-existing-project/postgresql) instead.

:::

Expand Down Expand Up @@ -38,7 +38,7 @@ Here's what each package does:

## 2. Initialize Prisma ORM

Set up your Prisma ORM project by creating your [Prisma Schema](/v6/orm/prisma-schema/overview) file with the following command:
Set up your Prisma ORM project by creating your [Prisma Schema](/docs/v6/orm/prisma-schema/overview) file with the following command:

```npm
npx prisma init --datasource-provider mysql --output ../generated/prisma
Expand Down Expand Up @@ -67,7 +67,7 @@ export default defineConfig({
});
```

The generated schema uses [the ESM-first `prisma-client` generator](/v6/orm/prisma-schema/overview/generators#prisma-client) with a custom output path:
The generated schema uses [the ESM-first `prisma-client` generator](/docs/v6/orm/prisma-schema/overview/generators#prisma-client) with a custom output path:

```prisma title="prisma/schema.prisma"
generator client {
Expand Down Expand Up @@ -217,7 +217,7 @@ For production deployments, use PlanetScale's [branching workflow](https://plane

## More info

- [PlanetScale database connector](/v6/orm/overview/databases/planetscale)
- [Prisma Config reference](/v6/orm/reference/prisma-config-reference)
- [Database introspection](/v6/orm/prisma-schema/introspection)
- [PlanetScale database connector](/docs/v6/orm/overview/databases/planetscale)
- [Prisma Config reference](/docs/v6/orm/reference/prisma-config-reference)
- [Database introspection](/docs/v6/orm/prisma-schema/introspection)
- [PlanetScale branching workflow](https://planetscale.com/docs/concepts/branching)
Loading
Loading