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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ datasource db {

In this case, the `url` is [set via an environment variable](/orm/more/development-environment/environment-variables) which is defined in `.env` (the example uses a [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) URL):

```bash file=.env
```bash file=.env showLineNumbers
DATABASE_URL="mongodb+srv://test:test@cluster0.ns1yp.mongodb.net/myFirstDatabase"
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ datasource db {

In this case, the `url` is [set via an environment variable](/orm/more/development-environment/environment-variables) which is defined in `.env` (the example uses a [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) URL):

```bash file=.env
```bash file=.env showLineNumbers
DATABASE_URL="mongodb+srv://test:test@cluster0.ns1yp.mongodb.net/myFirstDatabase"
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To incorporate changes from collaborators:

Migrations are **applied in the same order as they were created**. The creation date is part of the migration subfolder name - for example, `20210316081837-updated-fields` was created on `2021-03-16-08:08:37`.

<Admonition type="info">
<Admonition type="warning">

This guide **does not apply for MongoDB**.<br />
Instead of `migrate dev`, [`db push`](/orm/prisma-migrate/workflows/prototyping-your-schema) is used for [MongoDB](/orm/overview/databases/mongodb).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This guide describes how to resolve issues with Prisma Migrate in a development
- [Production troubleshooting](/orm/prisma-migrate/workflows/patching-and-hotfixing)
- [Patching / hotfixing production databases](/orm/prisma-migrate/workflows/patching-and-hotfixing)

<Admonition type="info">
<Admonition type="warning">

This guide **does not apply for MongoDB**.<br />
Instead of `migrate dev`, [`db push`](/orm/prisma-migrate/workflows/prototyping-your-schema) is used for [MongoDB](/orm/overview/databases/mongodb).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Baselining tells Prisma Migrate to assume that one or more migrations have **alr

Baselining is part of [adding Prisma Migrate to a project with an existing database](/orm/prisma-migrate/getting-started#adding-prisma-migrate-to-an-existing-project).

<Admonition type="info">
<Admonition type="warning">

This guide **does not apply for MongoDB**.<br />
Instead of `migrate deploy`, [`db push`](/orm/prisma-migrate/workflows/prototyping-your-schema) is used for [MongoDB](/orm/overview/databases/mongodb).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tocDepth: 3

<TopBlock title={frontMatter.title}>

<Admonition type="info">
<Admonition type="warning">

This guide **does not apply for MongoDB**.<br />
Instead of `migrate dev`, [`db push`](/orm/prisma-migrate/workflows/prototyping-your-schema) is used for [MongoDB](/orm/overview/databases/mongodb).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ When generating a migration SQL file, you may wish to also create a "down migrat

This guide explains how to use Prisma Migrate's [`migrate diff` command](/orm/reference/prisma-cli-reference#migrate-diff) to create a down migration, and how to apply it to your production database with the [`db execute`](/orm/reference/prisma-cli-reference#db-execute) command in the case of a failed up migration.

<Admonition type="info">
<Admonition type="warning">

This guide applies to generating SQL down migrations for relational databases only. It does not apply to MongoDB.
This guide applies to generating SQL down migrations for relational databases only. It **does not apply to MongoDB**.

</Admonition>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Patching or hotfixing a database involves making an often time critical change d

Patching the production database directly results in **schema drift**: your database schema has 'drifted away' from the source of truth, and is out of sync with your migration history. You can use the `prisma migrate resolve` command to reconcile your migration history _without_ having to remove and re-apply the hotfix with `prisma migrate deploy`.

<Admonition type="info">
<Admonition type="warning">

This guide **does not apply for MongoDB**.<br />
Instead of `migrate dev`, [`db push`](/orm/prisma-migrate/workflows/prototyping-your-schema) is used for [MongoDB](/orm/overview/databases/mongodb).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The Prisma schema is able to represent [unsupported field types](/orm/prisma-sch

:::

<Admonition type="info">
<Admonition type="warning">

This guide **does not apply for MongoDB**.<br />
Instead of `migrate dev`, [`db push`](/orm/prisma-migrate/workflows/prototyping-your-schema) is used for [MongoDB](/orm/overview/databases/mongodb).
Expand Down
9 changes: 4 additions & 5 deletions content/200-orm/400-tools/06-prisma-studio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ When you first open Prisma Studio, you see a list of all models defined in your

<Admonition>

**What is a model?**<br /><br />
**What is a model?**<br />

The term **model** refers to the data model definitions that you add to the Prisma schema file. Depending on the database that you use, a model definition, such as `model User`, refers to a **table** in a relational database (PostgreSQL, MySQL, SQL Server, SQLite, CockroachDB) or a **collection** in MongoDB.<br /><br />
For more information, see [Defining models](/orm/prisma-schema/data-model/models#defining-models).
Expand Down Expand Up @@ -75,7 +75,6 @@ When you open a model, a number of keyboard shortcuts are available to browse an

<Admonition>

**Note**<br /><br />
With Prisma Studio open, you can open the keyboard shortcuts modal by pressing <kbd>Cmd &#8984;</kbd>+<kbd>/</kbd> on macOS or <kbd>Ctrl</kbd>+<kbd>/</kbd> on Windows.

</Admonition>
Expand Down Expand Up @@ -212,9 +211,9 @@ You can select which fields to view or hide by using the **Fields** menu.

<Admonition>

**What is a field?**<br /><br />
**What is a field?**<br />

A **field** is a property of a model which you add in the data model definitions in the Prisma schema file. Depending on the database that you use, a field, such as the `title` field in `model User { title String }`, refers to a **column** in a relational database (PostgreSQL, MySQL, SQL Server, SQLite, CockroachDB) or a **document field** in MongoDB.<br /><br />
A **field** is a property of a model which you add in the data model definitions in the Prisma schema file. Depending on the database that you use, a field, such as the `title` field in `model User { title String }`, refers to a **column** in a relational database (PostgreSQL, MySQL, SQL Server, SQLite, CockroachDB) or a **document field** in MongoDB.<br />
For more information, see [Defining fields](/orm/prisma-schema/data-model/models#defining-fields).

</Admonition>
Expand All @@ -241,7 +240,7 @@ You can also select to show or skip a specific number of records in the model vi

<Admonition>

**What is a record?**<br /><br />
**What is a record?**<br />

A **record** refers to a **row of data in a table** in a relational database (PostgreSQL, MySQL, SQL Server, SQLite, CockroachDB) or a **document** in MongoDB.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ ALTER TABLE `Post`

After this adjustment, you can re-introspect your database and the `@default` attribute will be added to the `published` field:

```prisma line-number file=schema.prisma highlight=3;normal
```prisma line-number file=schema.prisma highlight=3;normal showLineNumbers
model Post {
id String @id
//highlight-next-line
Expand Down Expand Up @@ -332,7 +332,7 @@ ALTER TABLE `Profile`

After this adjustment, you can re-introspect your database and the 1-1 relation will be properly recognized:

```prisma line-number file=schema.prisma highlight=3;normal
```prisma line-number file=schema.prisma highlight=3;normal showLineNumbers
model User {
id String @id
//highlight-next-line
Expand Down