diff --git a/content/02-understand-prisma/03-prisma-in-your-stack/03-is-prisma-an-orm.mdx b/content/02-understand-prisma/03-prisma-in-your-stack/03-is-prisma-an-orm.mdx
index 150db7e3ee..6879fbabec 100644
--- a/content/02-understand-prisma/03-prisma-in-your-stack/03-is-prisma-an-orm.mdx
+++ b/content/02-understand-prisma/03-prisma-in-your-stack/03-is-prisma-an-orm.mdx
@@ -1,7 +1,7 @@
---
title: 'Is Prisma an ORM?'
metaTitle: 'Is Prisma an ORM?'
-metaDescription: "Learn why Prisma is not an ORM. It shares similar goals with ORMs and wants to make working with databases easy, but it does not map classes to tables as ORMs do."
+metaDescription: 'Learn why Prisma is not an ORM. It shares similar goals with ORMs and wants to make working with databases easy, but it does not map classes to tables as ORMs do.'
---
## Overview
diff --git a/content/03-reference/01-tools-and-interfaces/01-prisma-schema/03-generators.mdx b/content/03-reference/01-tools-and-interfaces/01-prisma-schema/03-generators.mdx
index db0b5958cf..7d27b40e8f 100644
--- a/content/03-reference/01-tools-and-interfaces/01-prisma-schema/03-generators.mdx
+++ b/content/03-reference/01-tools-and-interfaces/01-prisma-schema/03-generators.mdx
@@ -54,12 +54,12 @@ The following tables list all supported operating systems with the name of the b
#### Linux (Ubuntu)
-| Build OS | Build name | OpenSSL |
-| :-------------------- | :--------------------- | :------: |
-| Ubuntu 14.04 (trusty) | `debian-openssl-1.0.x` | 1.0.x |
-| Ubuntu 16.04 (xenial) | `debian-openssl-1.0.x` | 1.0.x |
-| Ubuntu 18.04 (bionic) | `debian-openssl-1.1.x` | 1.1.x |
-| Ubuntu 19.04 (disco) | `debian-openssl-1.1.x` | 1.1.x |
+| Build OS | Build name | OpenSSL |
+| :-------------------- | :--------------------- | :-----: |
+| Ubuntu 14.04 (trusty) | `debian-openssl-1.0.x` | 1.0.x |
+| Ubuntu 16.04 (xenial) | `debian-openssl-1.0.x` | 1.0.x |
+| Ubuntu 18.04 (bionic) | `debian-openssl-1.1.x` | 1.1.x |
+| Ubuntu 19.04 (disco) | `debian-openssl-1.1.x` | 1.1.x |
#### Linux (CentOS)
diff --git a/content/03-reference/01-tools-and-interfaces/01-prisma-schema/05-models.mdx b/content/03-reference/01-tools-and-interfaces/01-prisma-schema/05-models.mdx
index b9e8e6ffcd..9c0b36829a 100644
--- a/content/03-reference/01-tools-and-interfaces/01-prisma-schema/05-models.mdx
+++ b/content/03-reference/01-tools-and-interfaces/01-prisma-schema/05-models.mdx
@@ -99,7 +99,7 @@ Here's an overview of these for the fields from the `User` model [above](#exampl
### Naming fields
-Field names _must_ start with a letter and are typically spelled in [camelCase](http://wiki.c2.com/?CamelCase).
+Field names _must_ start with a letter and are typically spelled in [camelCase](http://wiki.c2.com/?CamelCase).
Technically, a field can be named anything that adheres to this regular expression:
@@ -192,7 +192,7 @@ const allUsers = await prisma.user.findMany();
Prisma Client not only provides a query API for models, it also generates type definitions that reflect your model structures. These are part of the generated [`@prisma/client`](../prisma-client/generating-prisma-client#the-prisma-client-npm-module) node module in a file called `index.d.ts`.
-When using TypeScript, these type definitions ensure that all your database queries are entirely type safe and validated at compile-time (even partial queries using [`select`](../prisma-client/field-selection#select) or [`include`](../prisma-client/field-selection#include)).
+When using TypeScript, these type definitions ensure that all your database queries are entirely type safe and validated at compile-time (even partial queries using [`select`](../prisma-client/field-selection#select) or [`include`](../prisma-client/field-selection#include)).
Even when using plain JavaScript, the type definitions are still included in the generated `@prisma/client` node module, enabling features like [IntelliSense](https://code.visualstudio.com/docs/editor/intellisense)/autocompletion in your editor.
diff --git a/content/03-reference/01-tools-and-interfaces/02-prisma-client/01-api.mdx b/content/03-reference/01-tools-and-interfaces/02-prisma-client/01-api.mdx
index 7b2cb51fc9..9a590271bf 100644
--- a/content/03-reference/01-tools-and-interfaces/02-prisma-client/01-api.mdx
+++ b/content/03-reference/01-tools-and-interfaces/02-prisma-client/01-api.mdx
@@ -77,12 +77,12 @@ Once you instantiated `PrismaClient`, you can start sending queries in your code
```ts
// run inside `async` function
const newUser = await prisma.user.create({
- data: {
- name: "Alice",
- email: "alice@prisma.io"
- }
-})
-const users = await prisma.user.findMany()
+ data: {
+ name: 'Alice',
+ email: 'alice@prisma.io',
+ },
+});
+const users = await prisma.user.findMany();
```
### 4. Evolving your application
diff --git a/content/03-reference/01-tools-and-interfaces/02-prisma-client/05-relation-queries.mdx b/content/03-reference/01-tools-and-interfaces/02-prisma-client/05-relation-queries.mdx
index 49d00d08c0..4ab5e76af4 100644
--- a/content/03-reference/01-tools-and-interfaces/02-prisma-client/05-relation-queries.mdx
+++ b/content/03-reference/01-tools-and-interfaces/02-prisma-client/05-relation-queries.mdx
@@ -63,7 +63,7 @@ This query returns all `Post` records by a specific `User`:
```ts
const postsByUser: Post[] = await prisma.user
.findOne({ where: { email: 'alice@prisma.io' } })
- .posts()
+ .posts();
```
Note that this call is equivalent to this Prisma Client query:
@@ -71,7 +71,7 @@ Note that this call is equivalent to this Prisma Client query:
```ts
const postsByUser = await prisma.post.findMany({
where: { author: { email: 'alice@prisma.io' } },
-})
+});
```
The main difference between the two is that the fluent API call is translated into two separate database queries while the other one only generates a single query (see this [GitHub issue](https://github.com/prisma/prisma2/issues/1984)).
@@ -79,7 +79,7 @@ The main difference between the two is that the fluent API call is translated in
This request returns all categories by a specific post:
```ts
-const categoriesOfPost: Category[] = await prisma.post.findOne({ where: { id: 1 } }).categories()
+const categoriesOfPost: Category[] = await prisma.post.findOne({ where: { id: 1 } }).categories();
```
Note that you can chain as many queries as you like. In this example, the chanining starts at `Profile` and goes over `User` to `Post`:
@@ -119,7 +119,7 @@ const posts: Post[] = await prisma.user
where: {
title: { startsWith: 'Hello' },
},
- })
+ });
```
Note that this query is _equivalent_ to the following one which is initiated via the `post` instead of the `user` field (i.e. it doesn't use the fluent API):
@@ -130,8 +130,8 @@ const posts = await prisma.post.findMany({
author: { email: 'bob@prisma.io' },
title: { startsWith: 'Hello' },
},
-})
-console.log(posts)
+});
+console.log(posts);
```
The main difference between the two is that the fluent API call is translated into two separate database queries while the other one only generates a single query (see this [GitHub issue](https://github.com/prisma/prisma2/issues/1984)).
@@ -187,7 +187,7 @@ const user = await prisma.user.create({
create: { bio: 'Hello World' },
},
},
-})
+});
```
This example uses the `user` model property, but you could also run the query from the `profile` side:
@@ -200,7 +200,7 @@ const user = await prisma.profile.create({
create: { email: 'alice@prisma.io' },
},
},
-})
+});
```
**Create a new `Profile` record and connect it to an existing `User` record**
@@ -213,7 +213,7 @@ const user = await prisma.profile.create({
connect: { email: 'alice@prisma.io' },
},
},
-})
+});
```
Note that this requires that a `User` record with an `email` of `"alice@prisma.io"` already exists in the database. If that's not the case, the query will fail with an exception.
@@ -228,7 +228,7 @@ const user = await prisma.profile.create({
connect: { id: 42 },
},
},
-})
+});
```
**Update an existing `User` record by creating a new `Profile` record**
@@ -241,7 +241,7 @@ const user = await prisma.user.update({
create: { bio: 'Hello World' },
},
},
-})
+});
```
**Update an existing `User` record by connecting it to an existing `Profile` record**
@@ -254,7 +254,7 @@ const user = await prisma.user.update({
connect: { id: 24 },
},
},
-})
+});
```
**Update an existing `User` record by updating the `Profile` record it's connected to**
@@ -267,7 +267,7 @@ const user = await prisma.user.update({
update: { bio: 'Hello World' },
},
},
-})
+});
```
**Update an existing `User` record by updating the `Profile` record it's connected to or creating a new one (_upsert_)**
@@ -283,7 +283,7 @@ const user = await prisma.user.update({
},
},
},
-})
+});
```
**Update an existing `User` record by deleting the `Profile` record it's connected to**
@@ -296,7 +296,7 @@ const user = await prisma.user.update({
delete: true,
},
},
-})
+});
```
**Update an existing `User` record by disconnecting the `Profile` record it's connected to**
@@ -309,7 +309,7 @@ const user = await prisma.user.update({
disconnect: true,
},
},
-})
+});
```
Note that this query is actually illegal with the data model from above because the `user` field on `Profile` is required. In order to make this query succeed, you'd need to make both relation fields optional:
@@ -372,7 +372,7 @@ const user = await prisma.user.create({
create: { title: 'Hello World' },
},
},
-})
+});
```
This example uses the `user` model property, but you could also run the query from the `post` side:
@@ -385,7 +385,7 @@ const user = await prisma.post.create({
create: { email: 'alice@prisma.io' },
},
},
-})
+});
```
**Create a new `User` record with two new `Post` records**:
@@ -400,7 +400,7 @@ const user = await prisma.user.create({
create: [{ title: 'This is my first post' }, { title: 'Here comes a second post' }],
},
},
-})
+});
```
**Create a new `Post` record and connect it to an existing `User` record**
@@ -413,7 +413,7 @@ const user = await prisma.post.create({
connect: { email: 'alice@prisma.io' },
},
},
-})
+});
```
Note that this requires that a `User` record with an `email` of `"alice@prisma.io"` already exists in the database. If that's not the case, the query will fail with an exception.
@@ -428,7 +428,7 @@ const user = await prisma.post.create({
connect: { id: 42 },
},
},
-})
+});
```
**Update an existing `User` record by creating a new `Post` record**
@@ -441,7 +441,7 @@ const user = await prisma.user.update({
create: { title: 'Hello World' },
},
},
-})
+});
```
**Update an existing `User` record by connecting it to two existing `Post` records**
@@ -454,7 +454,7 @@ const user = await prisma.user.update({
connect: [{ id: 24 }, { id: 42 }],
},
},
-})
+});
```
**Update an existing `User` record by updating two `Post` records it's connected to**
@@ -476,7 +476,7 @@ const user = await prisma.user.update({
],
},
},
-})
+});
```
**Update an existing `User` record by updating two `Post` record it's connected to or creating new ones (_upsert_)**
@@ -500,7 +500,7 @@ const user = await prisma.user.update({
],
},
},
-})
+});
```
**Update an existing `User` record by deleting two `Post` records it's connected to**
@@ -513,7 +513,7 @@ const user = await prisma.user.update({
delete: [{ id: 34 }, { id: 36 }],
},
},
-})
+});
```
**Update an existing `User` record by disconnecting two `Post` records it's connected to**
@@ -526,7 +526,7 @@ const user = await prisma.user.update({
disconnect: [{ id: 44 }, { id: 46 }],
},
},
-})
+});
```
**Update an existing `User` record by disconnecting any previous `Post` records and connect two other exiting ones**
@@ -539,7 +539,7 @@ const user = await prisma.user.update({
set: [{ id: 32 }, { id: 42 }],
},
},
-})
+});
```
## Nested reads
@@ -556,7 +556,7 @@ const users = await prisma.user.findMany({
posts: true,
profile: true,
},
-})
+});
```
**Include the `posts` relation on the returned objects when creating a new `User` record with two `Post` records**
@@ -570,7 +570,7 @@ const user = await prisma.user.create({
},
},
include: { posts: true },
-})
+});
```
**Retrieve deeply nested data by loading several levels of relations**
@@ -588,5 +588,5 @@ const users = await prisma.user.findMany({
},
},
},
-})
+});
```
diff --git a/content/03-reference/01-tools-and-interfaces/02-prisma-client/06-field-selection.mdx b/content/03-reference/01-tools-and-interfaces/02-prisma-client/06-field-selection.mdx
index 2475634d8f..10761d10a1 100644
--- a/content/03-reference/01-tools-and-interfaces/02-prisma-client/06-field-selection.mdx
+++ b/content/03-reference/01-tools-and-interfaces/02-prisma-client/06-field-selection.mdx
@@ -46,7 +46,7 @@ Consider the following example `findOne` invocation:
```ts
const result = await prisma.user.findOne({
where: { id: 1 },
-})
+});
```
The `result` of this API call is a plain old JavaScript object that might look similar to this:
diff --git a/content/03-reference/01-tools-and-interfaces/05-prisma-cli/01-installation.mdx b/content/03-reference/01-tools-and-interfaces/05-prisma-cli/01-installation.mdx
index 50a81691b5..7c2c3bd704 100644
--- a/content/03-reference/01-tools-and-interfaces/05-prisma-cli/01-installation.mdx
+++ b/content/03-reference/01-tools-and-interfaces/05-prisma-cli/01-installation.mdx
@@ -8,7 +8,6 @@ metaDescription: ''
The Prisma CLI is available as an [npm package](). It is **recommended to install the Prisma CLI locally** in your project's `package.json` to avoid version conflicts.
-
### Local installation (recommended)
The Prisma CLI is typically installed as a **development dependency**, that's why the `--save-dev` (npm) and `--dev` (Yarn) options are used in the commands below.
diff --git a/content/03-reference/02-database-connectors/01-database-features.mdx b/content/03-reference/02-database-connectors/01-database-features.mdx
index 31ea28f582..826fddf6de 100644
--- a/content/03-reference/02-database-connectors/01-database-features.mdx
+++ b/content/03-reference/02-database-connectors/01-database-features.mdx
@@ -16,14 +16,14 @@ If a feature is not supported natively by the database, it's also not available
### Constraints
-| Constraint | PostgreSQL | MySQL | SQLite | Prisma schema | Prisma Client | Prisma Migrate |
-| ------------- | :--------: | :---: | :----: | :--------------------------: | :-----------: | :------------: |
-| `PRIMARY KEY` | ✔️ | ✔️ | ✔️ | [`@id` and `@@id`](../prisma-schema/data-model#ids) | ✔️ | ✔️ |
-| `FOREIGN KEY` | ✔️ | ✔️ | ✔️ | [Relation fields](prisma-schema/relations#relation-fields) | ✔️ | ✔️ |
+| Constraint | PostgreSQL | MySQL | SQLite | Prisma schema | Prisma Client | Prisma Migrate |
+| ------------- | :--------: | :---: | :----: | :------------------------------------------------------------: | :-----------: | :------------: |
+| `PRIMARY KEY` | ✔️ | ✔️ | ✔️ | [`@id` and `@@id`](../prisma-schema/data-model#ids) | ✔️ | ✔️ |
+| `FOREIGN KEY` | ✔️ | ✔️ | ✔️ | [Relation fields](prisma-schema/relations#relation-fields) | ✔️ | ✔️ |
| `UNIQUE` | ✔️ | ✔️ | ✔️ | [`@unique` and `@@unique`](../prisma-schema/data-model#unique) | ✔️ | ✔️ |
-| `CHECK` | ✔️ | ✔\* | ✔️ | Not yet | ✔️ | Not yet |
-| `NOT NULL` | ✔️ | ✔️ | ✔️ | [`?`](../prisma-schema/models#type-modifiers) | ✔️ | ✔️ |
-| `DEFAULT` | ✔️ | ✔️ | ✔️ | [`@default`](../prisma-schema/data-model#default-values) | ✔️ | ✔️ |
+| `CHECK` | ✔️ | ✔\* | ✔️ | Not yet | ✔️ | Not yet |
+| `NOT NULL` | ✔️ | ✔️ | ✔️ | [`?`](../prisma-schema/models#type-modifiers) | ✔️ | ✔️ |
+| `DEFAULT` | ✔️ | ✔️ | ✔️ | [`@default`](../prisma-schema/data-model#default-values) | ✔️ | ✔️ |
\*In [MySQL 8 and higher](https://mysqlserverteam.com/mysql-8-0-16-introducing-check-constraint/)
@@ -49,11 +49,11 @@ If a feature is not supported natively by the database, it's also not available
### Indexes
-| Index | PostgreSQL | MySQL | SQLite | Prisma schema | Prisma Client | Prisma Migrate |
-| -------- | ---------- | ----- | ------ | ---------------------------- | ------------- | -------------- |
+| Index | PostgreSQL | MySQL | SQLite | Prisma schema | Prisma Client | Prisma Migrate |
+| -------- | ---------- | ----- | ------ | -------------------------------------------------------------- | ------------- | -------------- |
| `UNIQUE` | ✔️ | ✔️ | ✔️ | [`@unique` and `@@unique`](../prisma-schema/data-model#unique) | ✔️ | Not yet |
-| `WHERE` | ✔️ | ✔️ | ✔️ | Not yet | ✔️ | Not yet |
-| `USING` | ✔️ | ✔️ | ✔️ | Not yet | ✔️ | Not yet |
+| `WHERE` | ✔️ | ✔️ | ✔️ | Not yet | ✔️ | Not yet |
+| `USING` | ✔️ | ✔️ | ✔️ | Not yet | ✔️ | Not yet |
Algorithm specified via `USING`:
@@ -86,17 +86,17 @@ Lock option (MySQL):
### Misc
-| Feature | PostgreSQL | MySQL | SQLite | Prisma schema | Prisma Client | Prisma Migrate |
-| --------------------------------- | ---------- | ----- | ------ | --------------------- | ------------- | -------------- |
+| Feature | PostgreSQL | MySQL | SQLite | Prisma schema | Prisma Client | Prisma Migrate |
+| --------------------------------- | ---------- | ----- | ------ | ------------------------------------------------------------------------------------- | ------------- | -------------- |
| Autoincrementing IDs | ✔️ | ✔️ | ✔️ | [`autoincrement()`](../prisma-schema/data-model#single-field-ids-with-default-values) | ✔️ | ✔️ |
-| Arrays | ✔️ | No | No | [`[]`](../prisma-schema/models#type-modifiers) | ✔️ | ✔️ |
-| Enums | ✔️ | ✔️ | No | [`enum`](../prisma-schema/data-model#enums) | ✔️ | ✔️ |
-| Native database types | ✔️ | ✔️ | ✔️ | Not yet | ✔️ | Not yet |
-| SQL Views | ✔️ | ✔️ | ✔️ | Not yet | Not yet | Not yet |
-| Authorization and user management | ✔️ | ✔️ | No | Not yet | Not yet | Not yet |
-| JSON support | ✔️ | ✔️ | No | Not yet | Not yet | Not yet |
-| Fuzzy/Phrase full text search | ✔️ | ✔️ | No | Not yet | Not yet | Not yet |
-| Table inheritance | ✔️ | No | No | Not yet | ✔️ | Not yet |
+| Arrays | ✔️ | No | No | [`[]`](../prisma-schema/models#type-modifiers) | ✔️ | ✔️ |
+| Enums | ✔️ | ✔️ | No | [`enum`](../prisma-schema/data-model#enums) | ✔️ | ✔️ |
+| Native database types | ✔️ | ✔️ | ✔️ | Not yet | ✔️ | Not yet |
+| SQL Views | ✔️ | ✔️ | ✔️ | Not yet | Not yet | Not yet |
+| Authorization and user management | ✔️ | ✔️ | No | Not yet | Not yet | Not yet |
+| JSON support | ✔️ | ✔️ | No | Not yet | Not yet | Not yet |
+| Fuzzy/Phrase full text search | ✔️ | ✔️ | No | Not yet | Not yet | Not yet |
+| Table inheritance | ✔️ | No | No | Not yet | ✔️ | Not yet |
## Prisma features
@@ -110,9 +110,9 @@ You can find a full reference of all data modeling feature on the [Data model](.
The following functions are implemented by Prisma's query engine:
-| Name | Description |
-| -------- | -------------------------- |
-| `uuid()` | Generates a UUID value |
+| Name | Description |
+| -------- | ------------------------------------------------------------- |
+| `uuid()` | Generates a UUID value |
| `cuid()` | Generates a [cuid](https://github.com/ericelliott/cuid) value |
`uuid()` and `cuid()` are commonly used to set default values for [ID](../prisma-schema/data-model#ids) fields.
@@ -135,7 +135,6 @@ The following functions are available in Prisma and map to underlying database f
`autoincrement()` is commonly used to generated autoincrementing [ID](../prisma-schema/data-model
../prisma-schema/data-model#ids) values. `now()` is commonly used to initialize "createdAt"-fields that store the point in time when a record was created.
-
#### Attributes
The following [attributes](../prisma-schema/data-model#attributes) are available in Prisma. They either map to a database feature or are implemented by Prisma's [query engine](../prisma-client/query-engine):
@@ -148,7 +147,7 @@ The following [attributes](../prisma-schema/data-model#attributes) are available
| `@unique` | `UNIQUE` | Defines a unique constraint for this field. |
| `@@unique` | `UNIQUE` | Defines a compound unique constraint for the specified fields. |
| `@@index` | `INDEX` | Defines an index. |
-| `@relation` | n/a\* | Defines meta information about the relation. [Learn more](../prisma-schema/relations). |
+| `@relation` | n/a\* | Defines meta information about the relation. [Learn more](../prisma-schema/relations). |
| `@map` | n/a\* | Maps a field name from the Prisma schema to a different column name. |
| `@@map` | n/a\* | Maps a model name from the Prisma schema to a differenttable name. |
| `@updatedAt` | n/a\*\* | Automatically stores the time when a record was last updated. |
diff --git a/content/03-reference/02-database-connectors/03-postgresql.mdx b/content/03-reference/02-database-connectors/03-postgresql.mdx
index 68ef99dcc0..e7caff750e 100644
--- a/content/03-reference/02-database-connectors/03-postgresql.mdx
+++ b/content/03-reference/02-database-connectors/03-postgresql.mdx
@@ -42,13 +42,13 @@ postgresql://USER:PASSWORD@HOST:PORT/DATABASE
The following components make up the _base URL_ of your database, they are always required:
-| Name | Placeholder | Description |
-| :------- | :---------- | :---------------------------------------------------------- |
-| Host | `HOST` | IP address/domain of your database server, e.g. `localhost` |
-| Port | `PORT` | Port on which your database server is running, e.g. `5432` |
-| User | `USER` | Name of your database user, e.g. `janedoe` |
-| Password | `PASSWORD` | Password for your database user |
-| Database | `DATABASE` | Name of the [database](https://www.postgresql.org/docs/12/manage-ag-overview.html) you want to use, e.g. `mydb` |
+| Name | Placeholder | Description |
+| :------- | :---------- | :-------------------------------------------------------------------------------------------------------------- |
+| Host | `HOST` | IP address/domain of your database server, e.g. `localhost` |
+| Port | `PORT` | Port on which your database server is running, e.g. `5432` |
+| User | `USER` | Name of your database user, e.g. `janedoe` |
+| Password | `PASSWORD` | Password for your database user |
+| Database | `DATABASE` | Name of the [database](https://www.postgresql.org/docs/12/manage-ag-overview.html) you want to use, e.g. `mydb` |
**Arguments**
@@ -60,18 +60,18 @@ postgresql://USER:PASSWORD@HOST:PORT/DATABASE?KEY1=VALUE&KEY2=VALUE&KEY3=VALUE
The following arguments can be used
-| Argument name | Required | Default | Description |
-| :----------------- | :------- | ---------------------- | ------------------------------------------------------------------------------ |
-| `schema` | **Yes** | `public` | Name of the [schema](https://www.postgresql.org/docs/12/ddl-schemas.html) you want to use, e.g. `myschema` |
-| `connection_limit` | No | `num_cpus * 2 + 1` | Maximum size of the [connection pool](../prisma-client/connection-management#connection-pool)) |
-| `connect_timeout` | No | `5` | Maximum number of seconds to wait for a new connection |
-| `socket_timeout` | No | `5` | Maximum number of seconds to wait until a single query terminates |
-| `sslmode` | No | `prefer` | Configures whether to use TLS, possible values: `prefer`, `disable`, `require` |
-| `sslcert` | No | | Path the the server certificate |
-| `sslidentity` | No | | Path to the PKCS12 certificate |
-| `sslpassword` | No | | Password that was used to secure the PKCS12 file |
-| `sslaccept` | No | `accept_invalid_certs` | Configures whether to check for missing values in the certificate |
-| `host` | No | | Points to a directory that contains a socket to be used for the connection |
+| Argument name | Required | Default | Description |
+| :----------------- | :------- | ---------------------- | ---------------------------------------------------------------------------------------------------------- |
+| `schema` | **Yes** | `public` | Name of the [schema](https://www.postgresql.org/docs/12/ddl-schemas.html) you want to use, e.g. `myschema` |
+| `connection_limit` | No | `num_cpus * 2 + 1` | Maximum size of the [connection pool](../prisma-client/connection-management#connection-pool)) |
+| `connect_timeout` | No | `5` | Maximum number of seconds to wait for a new connection |
+| `socket_timeout` | No | `5` | Maximum number of seconds to wait until a single query terminates |
+| `sslmode` | No | `prefer` | Configures whether to use TLS, possible values: `prefer`, `disable`, `require` |
+| `sslcert` | No | | Path the the server certificate |
+| `sslidentity` | No | | Path to the PKCS12 certificate |
+| `sslpassword` | No | | Password that was used to secure the PKCS12 file |
+| `sslaccept` | No | `accept_invalid_certs` | Configures whether to check for missing values in the certificate |
+| `host` | No | | Points to a directory that contains a socket to be used for the connection |
As an example, if you want to connect to a schema called `myschema`, set the connection pool size to `5` and configure a timeout for queries of `3` seconds, you can use the following arguments:
diff --git a/content/03-reference/02-database-connectors/04-mysql.mdx b/content/03-reference/02-database-connectors/04-mysql.mdx
index a2fb80f9ae..08ca6390e3 100644
--- a/content/03-reference/02-database-connectors/04-mysql.mdx
+++ b/content/03-reference/02-database-connectors/04-mysql.mdx
@@ -42,13 +42,13 @@ mysql://USER:PASSWORD@HOST:PORT/DATABASE
The following components make up the _base URL_ of your database, they are always required:
-| Name | Placeholder | Description |
-| :------- | :---------- | :---------------------------------------------------------- |
-| Host | `HOST` | IP address/domain of your database server, e.g. `localhost` |
-| Port | `PORT` | Port on which your database server is running, e.g. `5432` |
-| User | `USER` | Name of your database user, e.g. `janedoe` |
-| Password | `PASSWORD` | Password for your database user |
-| Database | `DATABASE` | Name of the [database](https://dev.mysql.com/doc/refman/8.0/en/creating-database.html) you want to use, e.g. `mydb` |
+| Name | Placeholder | Description |
+| :------- | :---------- | :------------------------------------------------------------------------------------------------------------------ |
+| Host | `HOST` | IP address/domain of your database server, e.g. `localhost` |
+| Port | `PORT` | Port on which your database server is running, e.g. `5432` |
+| User | `USER` | Name of your database user, e.g. `janedoe` |
+| Password | `PASSWORD` | Password for your database user |
+| Database | `DATABASE` | Name of the [database](https://dev.mysql.com/doc/refman/8.0/en/creating-database.html) you want to use, e.g. `mydb` |
**Arguments**
@@ -60,17 +60,17 @@ mysql://USER:PASSWORD@HOST:PORT/DATABASE?KEY1=VALUE&KEY2=VALUE&KEY3=VALUE
The following arguments can be used
-| Argument name | Required | Default | Description |
-| :----------------- | :------- | ---------------------- | ------------------------------------------------------------------------------ |
-| `connection_limit` | No | `num_cpus * 2 + 1` | Maximum size of the [connection pool](../prisma-client/connection-management#connection-pool) |
-| `connect_timeout` | No | `5` | Maximum number of seconds to wait for a new connection |
-| `socket_timeout` | No | `5` | Maximum number of seconds to wait until a single query terminates |
-| `sslmode` | No | `prefer` | Configures whether to use TLS, possible values: `prefer`, `disable`, `require` |
-| `sslcert` | No | | Path the the server certificate |
-| `sslidentity` | No | | Path to the PKCS12 certificate |
-| `sslpassword` | No | | Password that was used to secure the PKCS12 file |
-| `sslaccept` | No | `accept_invalid_certs` | Configures whether to check for missing values in the certificate |
-| `host` | No | | Points to a directory that contains a socket to be used for the connection |
+| Argument name | Required | Default | Description |
+| :----------------- | :------- | ---------------------- | --------------------------------------------------------------------------------------------- |
+| `connection_limit` | No | `num_cpus * 2 + 1` | Maximum size of the [connection pool](../prisma-client/connection-management#connection-pool) |
+| `connect_timeout` | No | `5` | Maximum number of seconds to wait for a new connection |
+| `socket_timeout` | No | `5` | Maximum number of seconds to wait until a single query terminates |
+| `sslmode` | No | `prefer` | Configures whether to use TLS, possible values: `prefer`, `disable`, `require` |
+| `sslcert` | No | | Path the the server certificate |
+| `sslidentity` | No | | Path to the PKCS12 certificate |
+| `sslpassword` | No | | Password that was used to secure the PKCS12 file |
+| `sslaccept` | No | `accept_invalid_certs` | Configures whether to check for missing values in the certificate |
+| `host` | No | | Points to a directory that contains a socket to be used for the connection |
As an example, if you want to connect to a schema called `myschema`, set the connection pool size to `5` and configure a timeout for queries of `3` seconds, you can use the following arguments:
diff --git a/content/04-guides/01-database-workflows/01-setting-up-a-database/01-postgresql.mdx b/content/04-guides/01-database-workflows/01-setting-up-a-database/01-postgresql.mdx
index 35344e5d64..d4194d1dd7 100644
--- a/content/04-guides/01-database-workflows/01-setting-up-a-database/01-postgresql.mdx
+++ b/content/04-guides/01-database-workflows/01-setting-up-a-database/01-postgresql.mdx
@@ -6,15 +6,15 @@ metaDescription: 'Learn how to set up a PostgreSQL database on Windows, Mac OS o
## Overview
-This page explains how to install and configure a [PostgreSQL database server](https://www.postgresql.org/docs/current/intro-whatis.html) and the [`psql` command line client](https://www.postgresql.org/docs/current/app-psql.html). This guide will cover how to install and set up these components on your computer for local access.
+This page explains how to install and configure a [PostgreSQL database server](https://www.postgresql.org/docs/current/intro-whatis.html) and the [`psql` command line client](https://www.postgresql.org/docs/current/app-psql.html). This guide will cover how to install and set up these components on your computer for local access.
This guide will cover the following platforms:
-* [Setting up PostgreSQL on Windows](#setting-up-postgresql-on-windows)
-* [Setting up PostgreSQL on macOS](#setting-up-postgresql-on-macos)
-* [Setting up PostgreSQL on Linux](#setting-up-postgresql-on-linux)
- * [Debian and Ubuntu](#debian-and-ubuntu)
- * [CentOS and Fedora](#centos-and-fedora)
+- [Setting up PostgreSQL on Windows](#setting-up-postgresql-on-windows)
+- [Setting up PostgreSQL on macOS](#setting-up-postgresql-on-macos)
+- [Setting up PostgreSQL on Linux](#setting-up-postgresql-on-linux)
+ - [Debian and Ubuntu](#debian-and-ubuntu)
+ - [CentOS and Fedora](#centos-and-fedora)
Navigate to the sections that match the platforms you will be working with.
@@ -22,7 +22,7 @@ Navigate to the sections that match the platforms you will be working with.
The PostgreSQL project provides a native Windows installer to install and configure your database.
-Visit the [PostgreSQL Windows installation page](https://www.postgresql.org/download/windows/) to find a link to the installer. Click **Download the installer** at the start of the page:
+Visit the [PostgreSQL Windows installation page](https://www.postgresql.org/download/windows/) to find a link to the installer. Click **Download the installer** at the start of the page:

@@ -44,7 +44,7 @@ On the next page, choose your installation directory:
Click **Next** to accept the default location.
-The next page allows you to choose which components you wish to install. You need the **PostgreSQL Server** and **Command Line Tools** selected at a minimum:
+The next page allows you to choose which components you wish to install. You need the **PostgreSQL Server** and **Command Line Tools** selected at a minimum:

@@ -74,7 +74,7 @@ Now, pick the locale that your database will use:
Click **Next** to use the default locale of your computer.
-The configuration portion of the installation is now complete. You can review a summary of the choices you've made:
+The configuration portion of the installation is now complete. You can review a summary of the choices you've made:

@@ -88,11 +88,11 @@ Click **Next** to begin the installation process.
Once the installation is complete, you can verify the installation using the `psql` command line tool.
-In your start menu, type `psql` and click on the tool to launch the program. You will be prompted to enter the connection details that you wish to use.
+In your start menu, type `psql` and click on the tool to launch the program. You will be prompted to enter the connection details that you wish to use.

-Press **Enter** to accept the default choices given in the square brackets. The final prompt will be for the password for the `postgres` user that you configured during setup.
+Press **Enter** to accept the default choices given in the square brackets. The final prompt will be for the password for the `postgres` user that you configured during setup.
Upon successfully authenticating, you will be dropped into an interactive `psql` session with your database.
@@ -106,7 +106,7 @@ When you are finished, exit the session by typing:
The PostgreSQL project provides a native macOS installer to install and configure your database.
-Visit the [PostgreSQL macOS installation page](https://www.postgresql.org/download/macosx/) to find a link to the installer. Click **Download the installer** at the start of the **Interactive Installer by EnterpriseDB** section:
+Visit the [PostgreSQL macOS installation page](https://www.postgresql.org/download/macosx/) to find a link to the installer. Click **Download the installer** at the start of the **Interactive Installer by EnterpriseDB** section:

@@ -116,7 +116,7 @@ On the page that follows, in the Mac OS X column, choose the PostgreSQL version
Click **Download** on your chosen version and save the file to a convenient location.
-Once the download completes, find the PostgreSQL installer DMG in the Downloads folder. Double click on the downloaded DMG file to mount the installer archive:
+Once the download completes, find the PostgreSQL installer DMG in the Downloads folder. Double click on the downloaded DMG file to mount the installer archive:

@@ -136,7 +136,7 @@ On the next page, choose your installation directory:
Click **Next** to accept the default location.
-The next page allows you to choose which components you wish to install. You need the **PostgreSQL Server** and **Command Line Tools** selected at a minimum:
+The next page allows you to choose which components you wish to install. You need the **PostgreSQL Server** and **Command Line Tools** selected at a minimum:

@@ -166,7 +166,7 @@ Now, pick the locale that your database will use:
Click **Next** to use the default locale of your computer.
-The configuration portion of the installation is now complete. You can review a summary of the choices you've made:
+The configuration portion of the installation is now complete. You can review a summary of the choices you've made:

@@ -182,15 +182,15 @@ The installer will confirm completion when the process completes:

-Now that PostgreSQL is installed, you can verify the installation using the `psql` command line tool. While this client is installed, we need to modify our terminal's `PATH` variable to access it easily.
+Now that PostgreSQL is installed, you can verify the installation using the `psql` command line tool. While this client is installed, we need to modify our terminal's `PATH` variable to access it easily.
-Open a new terminal window to begin. First, find the PostgreSQL `bin` directory by typing:
+Open a new terminal window to begin. First, find the PostgreSQL `bin` directory by typing:
```
ls -d /Library/PostgreSQL/*/bin
```
-The response will be the directory of your PostgreSQL `bin` directory. For example:
+The response will be the directory of your PostgreSQL `bin` directory. For example:
```
/Library/PostgreSQL/12/bin
@@ -212,7 +212,7 @@ Add the path to `bin` directory that you found to the bottom of the file:
When you are finished, save and close the file by typing CTL-X, Y, and hitting ENTER.
-To use the new `PATH` settings, open a new terminal window. In the new window, type:
+To use the new `PATH` settings, open a new terminal window. In the new window, type:
```
psql -U postgres
@@ -232,27 +232,27 @@ To exit the session when you are finished, type:
## Setting up PostgreSQL on Linux
-Installation methods differ depending on the Linux distribution you are using. Follow the section below that matches your Linux distribution.
+Installation methods differ depending on the Linux distribution you are using. Follow the section below that matches your Linux distribution.
-* [Debian and Ubuntu](#debian-and-ubuntu)
- * [Install using Debian or Ubuntu's default repositories](#install-using-debian-or-ubuntus-default-repositories)
- * [Install using the PostgreSQL project's Debian and Ubuntu repositories](#install-using-the-postgresql-projects-debian-and-ubuntu-repositories)
-* [CentOS and Fedora](#centos-and-fedora)
- * [Install using CentOS or Fedora's default repositories](#install-using-centos-or-fedoras-default-repositories)
- * [Install using the PostgreSQL project's CentOS and Fedora repositories](#install-using-the-postgresql-projects-centos-and-fedora-repositories)
+- [Debian and Ubuntu](#debian-and-ubuntu)
+ - [Install using Debian or Ubuntu's default repositories](#install-using-debian-or-ubuntus-default-repositories)
+ - [Install using the PostgreSQL project's Debian and Ubuntu repositories](#install-using-the-postgresql-projects-debian-and-ubuntu-repositories)
+- [CentOS and Fedora](#centos-and-fedora)
+ - [Install using CentOS or Fedora's default repositories](#install-using-centos-or-fedoras-default-repositories)
+ - [Install using the PostgreSQL project's CentOS and Fedora repositories](#install-using-the-postgresql-projects-centos-and-fedora-repositories)
### Debian and Ubuntu
-You can either choose to use the version of PostgreSQL available in your distribution's default repositories or use repositories provided by the PostgreSQL project. Packages in the default repository are tested to work with all other software provided for your distribution, but may be older. Packages from the PostgreSQL project will be more up-to-date but may require extra configuration.
+You can either choose to use the version of PostgreSQL available in your distribution's default repositories or use repositories provided by the PostgreSQL project. Packages in the default repository are tested to work with all other software provided for your distribution, but may be older. Packages from the PostgreSQL project will be more up-to-date but may require extra configuration.
-* [Install using Debian or Ubuntu's default repositories](#install-using-debian-or-ubuntus-default-repositories)
-* [Install using the PostgreSQL project's Debian and Ubuntu repositories](#install-using-the-postgresql-projects-debian-and-ubuntu-repositories)
+- [Install using Debian or Ubuntu's default repositories](#install-using-debian-or-ubuntus-default-repositories)
+- [Install using the PostgreSQL project's Debian and Ubuntu repositories](#install-using-the-postgresql-projects-debian-and-ubuntu-repositories)
#### Install using Debian or Ubuntu's default repositories
-Both Ubuntu and Debian provide versions of PostgreSQL server as packages within their default repositories. The PostgreSQL version may be older than those found on the PostgreSQL website, but this is the simplest way to install on these distributions.
+Both Ubuntu and Debian provide versions of PostgreSQL server as packages within their default repositories. The PostgreSQL version may be older than those found on the PostgreSQL website, but this is the simplest way to install on these distributions.
-To install PostgreSQL server, update your computer's local package cache with the latest set of packages. Afterwards, install the `postgresql` package:
+To install PostgreSQL server, update your computer's local package cache with the latest set of packages. Afterwards, install the `postgresql` package:
```
sudo apt update
@@ -261,7 +261,7 @@ sudo apt install postgresql
By default, PostgreSQL is configured to use [peer authentication](https://www.postgresql.org/docs/10/auth-methods.html#AUTH-PEER), which allows users to log in if their operating system user name matches a PostgreSQL internal name.
-The installation process created an operating system user called `postgres` to match the `postgres` database administrative account. To log into PostgreSQL with the `psql` client, use `sudo` to run the command as the `postgres` user:
+The installation process created an operating system user called `postgres` to match the `postgres` database administrative account. To log into PostgreSQL with the `psql` client, use `sudo` to run the command as the `postgres` user:
```
sudo -u postgres psql
@@ -298,7 +298,7 @@ sudo apt install postgresql
By default, PostgreSQL is configured to use [peer authentication](https://www.postgresql.org/docs/10/auth-methods.html#AUTH-PEER), which allows users to log in if their operating system user name matches a PostgreSQL internal name.
-The installation process created an operating system user called `postgres` to match the `postgres` database administrative account. To log into PostgreSQL with the `psql` client, use `sudo` to run the command as the `postgres` user:
+The installation process created an operating system user called `postgres` to match the `postgres` database administrative account. To log into PostgreSQL with the `psql` client, use `sudo` to run the command as the `postgres` user:
```
sudo -u postgres psql
@@ -312,14 +312,14 @@ When you are finished, you can exit the `psql` session by typing:
### CentOS and Fedora
-You can either choose to use the version of PostgreSQL available in your distribution's default repositories or use repositories provided by the PostgreSQL project. Packages in the default repository are tested to work with all other software provided for your distribution, but may be older. Packages from the PostgreSQL project will be more up-to-date but may require extra configuration.
+You can either choose to use the version of PostgreSQL available in your distribution's default repositories or use repositories provided by the PostgreSQL project. Packages in the default repository are tested to work with all other software provided for your distribution, but may be older. Packages from the PostgreSQL project will be more up-to-date but may require extra configuration.
-* [Install using CentOS or Fedora's default repositories](#install-using-centos-or-fedoras-default-repositories)
-* [Install using the PostgreSQL project's CentOS and Fedora repositories](#install-using-the-postgresql-projects-centos-and-fedora-repositories)
+- [Install using CentOS or Fedora's default repositories](#install-using-centos-or-fedoras-default-repositories)
+- [Install using the PostgreSQL project's CentOS and Fedora repositories](#install-using-the-postgresql-projects-centos-and-fedora-repositories)
#### Install using CentOS or Fedora's default repositories
-Both CentOS and Fedora provide versions of PostgreSQL server as packages within their default repositories. The PostgreSQL version may be older than those found on the PostgreSQL website, but this is the simplest way to install on these distributions.
+Both CentOS and Fedora provide versions of PostgreSQL server as packages within their default repositories. The PostgreSQL version may be older than those found on the PostgreSQL website, but this is the simplest way to install on these distributions.
To install PostgreSQL server, use your distribution's package manager to install the `mysql-server` package:
@@ -355,7 +355,7 @@ sudo systemctl enable postgresql.service
By default, PostgreSQL is configured to use [peer authentication](https://www.postgresql.org/docs/10/auth-methods.html#AUTH-PEER), which allows users to log in if their operating system user name matches a PostgreSQL internal name.
-The installation process created an operating system user called `postgres` to match the `postgres` database administrative account. To log into PostgreSQL with the `psql` client, use `sudo` to run the command as the `postgres` user:
+The installation process created an operating system user called `postgres` to match the `postgres` database administrative account. To log into PostgreSQL with the `psql` client, use `sudo` to run the command as the `postgres` user:
```
sudo -u postgres psql
@@ -385,7 +385,7 @@ For **Fedora** use this command:
sudo dnf install "https://download.postgresql.org/pub/repos/yum/reporpms/F-$(. /etc/os-release; echo $VERSION_ID)-x86_64/pgdg-fedora-repo-latest.noarch.rpm"
```
-If you are using **CentOS 8**, you must also disable the system's PostgreSQL module to prevent it from interfering with the repository's PostgreSQL version. To do so, type:
+If you are using **CentOS 8**, you must also disable the system's PostgreSQL module to prevent it from interfering with the repository's PostgreSQL version. To do so, type:
```
sudo yum module disable postgresql
@@ -407,13 +407,13 @@ dnf list postgresql*-server
After deciding which version to use, you can install it using your package manager.
-For **CentOS** use the `yum` package manager. For example, to install PostgreSQL 12, type:
+For **CentOS** use the `yum` package manager. For example, to install PostgreSQL 12, type:
```
sudo yum install postgresql12-server
```
-For **Fedora** use the `dnf` package manager. For example, to install PostgreSQL 12, type:
+For **Fedora** use the `dnf` package manager. For example, to install PostgreSQL 12, type:
```
sudo dnf install postgresql12-server
@@ -431,7 +431,7 @@ Find the name of the systemd unit file for your version of PostgreSQL:
systemctl list-unit-files | grep postgresql
```
-Start up the service using the unit file you found. For example, for PostgreSQL 12, it would be:
+Start up the service using the unit file you found. For example, for PostgreSQL 12, it would be:
```
sudo systemctl start postgresql-12.service
@@ -445,7 +445,7 @@ sudo systemctl enable postgresql-12.service
By default, PostgreSQL is configured to use [peer authentication](https://www.postgresql.org/docs/10/auth-methods.html#AUTH-PEER), which allows users to log in if their operating system user name matches a PostgreSQL internal name.
-The installation process created an operating system user called `postgres` to match the `postgres` database administrative account. To log into PostgreSQL with the `psql` client, use `sudo` to run the command as the `postgres` user:
+The installation process created an operating system user called `postgres` to match the `postgres` database administrative account. To log into PostgreSQL with the `psql` client, use `sudo` to run the command as the `postgres` user:
```
sudo -u postgres psql
diff --git a/content/04-guides/01-database-workflows/01-setting-up-a-database/02-mysql.mdx b/content/04-guides/01-database-workflows/01-setting-up-a-database/02-mysql.mdx
index 556c86007d..a2d0e39237 100644
--- a/content/04-guides/01-database-workflows/01-setting-up-a-database/02-mysql.mdx
+++ b/content/04-guides/01-database-workflows/01-setting-up-a-database/02-mysql.mdx
@@ -6,15 +6,15 @@ metaDescription: 'Learn how to set up a MySQL database on Windows, Mac OS or Lin
## Overview
-This page explains how to install and configure the [MySQL database server](https://dev.mysql.com/doc/refman/8.0/en/mysqld.html), and the [`mysql` command line client](https://dev.mysql.com/doc/refman/8.0/en/mysql.html). This guide will cover how to install and set up these components on your computer for local access.
+This page explains how to install and configure the [MySQL database server](https://dev.mysql.com/doc/refman/8.0/en/mysqld.html), and the [`mysql` command line client](https://dev.mysql.com/doc/refman/8.0/en/mysql.html). This guide will cover how to install and set up these components on your computer for local access.
This guide will cover the following platforms:
-* [Setting up MySQL on Windows](#setting-up-mysql-on-windows)
-* [Setting up MySQL on macOS](#setting-up-mysql-on-macos)
-* [Setting up MySQL on Linux](#setting-up-mysql-on-linux)
- * [Debian and Ubuntu](#debian-and-ubuntu)
- * [CentOS and Fedora](#centos-and-fedora)
+- [Setting up MySQL on Windows](#setting-up-mysql-on-windows)
+- [Setting up MySQL on macOS](#setting-up-mysql-on-macos)
+- [Setting up MySQL on Linux](#setting-up-mysql-on-linux)
+ - [Debian and Ubuntu](#debian-and-ubuntu)
+ - [CentOS and Fedora](#centos-and-fedora)
Navigate to the sections that match the platforms you will be working with.
@@ -30,14 +30,14 @@ Click **MySQL Installer for Windows**.
On the next page, you'll have a choice of installers to download:
-* **web installer**: The web installer is a smaller initial download. It will download components as-needed during the installation process. This option works when you have an internet connection during installation.
-* **conventional (offline) installer**:The conventional installer is the larger download. It comes bundled with all of the components and files you will need to install. This makes offline installation possible.
+- **web installer**: The web installer is a smaller initial download. It will download components as-needed during the installation process. This option works when you have an internet connection during installation.
+- **conventional (offline) installer**:The conventional installer is the larger download. It comes bundled with all of the components and files you will need to install. This makes offline installation possible.

Choose the installer that suits your requirements and click **Download**.
-Next, you will be given the option to create an Oracle Web Account. Feel free to skip this by clicking **No thanks, just start my download** towards the bottom of the page:
+Next, you will be given the option to create an Oracle Web Account. Feel free to skip this by clicking **No thanks, just start my download** towards the bottom of the page:

@@ -47,7 +47,7 @@ The installer begins by asking what components you would like to install:

-For a minimal install, the **Server only** option contains all of the components you need. Despite its name, this option also includes the `mysql` command line client. Click **Next** after making your selection.
+For a minimal install, the **Server only** option contains all of the components you need. Despite its name, this option also includes the `mysql` command line client. Click **Next** after making your selection.
The following page confirms your selection:
@@ -61,7 +61,7 @@ Once the installation is complete, the installer prompts you to configure the ne
Click **Next** to begin the configuration process.
-The first configuration option is to select the level of availability for the installation. Since this is a local installation, select **Standalone MySQL Server / Classic MySQL Replication**.
+The first configuration option is to select the level of availability for the installation. Since this is a local installation, select **Standalone MySQL Server / Classic MySQL Replication**.

@@ -69,7 +69,7 @@ Click **Next** to continue.
The page that follows allows you to configure your machine type (which influences resource allocation for the server) and the network connectivity.
-**Development Computer** option is usually the best choice if you are using the computer for daily tasks. The default networking options are also usually adequate.
+**Development Computer** option is usually the best choice if you are using the computer for daily tasks. The default networking options are also usually adequate.

@@ -77,24 +77,24 @@ Click **Next** to move on.
The next page allows you to choose between two authentication encryption methods:
-* **Strong Password Encryption**: Configures more secure authentication for new installations.
-* **Legacy Authentication**: Configures less secure authentication necessary for compatibility with legacy applications.
+- **Strong Password Encryption**: Configures more secure authentication for new installations.
+- **Legacy Authentication**: Configures less secure authentication necessary for compatibility with legacy applications.

Unless you have a strong reason not to, choose **Strong Password Encryption** and click **Next** to continue.
-Next, you are prompted to set a password for the MySQL *root* account, which has administrative privileges for the MySQL installation:
+Next, you are prompted to set a password for the MySQL _root_ account, which has administrative privileges for the MySQL installation:

-Choose and confirm a strong password. If you want to use this opportunity to add additional user accounts, you can click **Add User** and follow the prompts. Click **Next** when you are ready to move on.
+Choose and confirm a strong password. If you want to use this opportunity to add additional user accounts, you can click **Add User** and follow the prompts. Click **Next** when you are ready to move on.
Finally, you'll be asked to configure the MySQL Windows Service:

-The default selections work well unless you have specific requirements. Click **Next** to continue.
+The default selections work well unless you have specific requirements. Click **Next** to continue.
The configuration is now complete.
@@ -102,25 +102,25 @@ The configuration is now complete.
If you're happy with your selections, click **Execute** to configure your installation.
-With MySQL configured, you can now test your access using the `mysql` command line client. In the Windows start menu, search for "mysql" and click the MySQL Command Line Client.
+With MySQL configured, you can now test your access using the `mysql` command line client. In the Windows start menu, search for "mysql" and click the MySQL Command Line Client.
A MySQL window will appear, prompting for a password:

-Enter the administrative `root` password that you selected during configuration. Upon successfully authenticating, you will be given a MySQL prompt where you can interact with your database. Type `quit` to exit.
+Enter the administrative `root` password that you selected during configuration. Upon successfully authenticating, you will be given a MySQL prompt where you can interact with your database. Type `quit` to exit.
## Setting up MySQL on macOS
The MySQL project provides a macOS DMG archive to install and configure MySQL.
-Visit the [MySQL download page](https://dev.mysql.com/downloads/mysql) and select **macOS** from the operating system drop down. A few different installation options are available:
+Visit the [MySQL download page](https://dev.mysql.com/downloads/mysql) and select **macOS** from the operating system drop down. A few different installation options are available:

Click **Download** next to the macOS DMG Archive.
-Next, you will be given the option to create an Oracle Web Account. Feel free to skip this by clicking **No thanks, just start my download** towards the bottom of the page:
+Next, you will be given the option to create an Oracle Web Account. Feel free to skip this by clicking **No thanks, just start my download** towards the bottom of the page:

@@ -128,7 +128,7 @@ Once the download completes, double click on the file to mount the DMG file:

-Click on the installer package inside the mounted DMG. You may have to confirm that you wish to allow the program to make changes to your computer:
+Click on the installer package inside the mounted DMG. You may have to confirm that you wish to allow the program to make changes to your computer:

@@ -142,14 +142,14 @@ Next, you will be asked to select the installation type:

-The standard installation is a good choice for most people, but if you wish to modify things, you can click **Customize**. When you are happy with your choices, click **Install**. The installation will then begin.
+The standard installation is a good choice for most people, but if you wish to modify things, you can click **Customize**. When you are happy with your choices, click **Install**. The installation will then begin.
When the installation is complete, you will be asked to configure MySQL.
The first configuration page allows you to choose between two authentication methods:
-* **Strong Password Encryption**: Configures more secure authentication for new installations.
-* **Legacy Authentication**: Configures less secure authentication necessary for compatibility with legacy applications.
+- **Strong Password Encryption**: Configures more secure authentication for new installations.
+- **Legacy Authentication**: Configures less secure authentication necessary for compatibility with legacy applications.

@@ -167,9 +167,9 @@ The installer will confirm that the operation was successful:
Click **Close** to close the window.
-The MySQL server should be up and running. To access the `mysql` command line program, you have to modify your system's `PATH` environment variable.
+The MySQL server should be up and running. To access the `mysql` command line program, you have to modify your system's `PATH` environment variable.
-To do so, open a terminal window. Edit the `/etc/path` file with the following command:
+To do so, open a terminal window. Edit the `/etc/path` file with the following command:
```
sudo nano /etc/paths
@@ -185,13 +185,13 @@ At the bottom of the file, add the `/usr/local/mysql/bin` directory:
When you are done, save and close the editor by typing CTL-X, Y, and hitting ENTER.
-To read the new `PATH` settings, open a *new* terminal window. Login to the MySQL database using the `root` administrative account:
+To read the new `PATH` settings, open a _new_ terminal window. Login to the MySQL database using the `root` administrative account:
```
mysql -u root -p
```
-You will be prompted for the password you set up during the MySQL configuration process. After successfully authenticating, you will be given a MySQL prompt:
+You will be prompted for the password you set up during the MySQL configuration process. After successfully authenticating, you will be given a MySQL prompt:

@@ -199,27 +199,27 @@ Type `quit` to exit when you are finished.
## Setting up MySQL on Linux
-You can install MySQL on Linux with a number of different methods depending on your Linux distribution and preferences. Choose the link below that best fits your needs:
+You can install MySQL on Linux with a number of different methods depending on your Linux distribution and preferences. Choose the link below that best fits your needs:
-* [Debian and Ubuntu](#debian-and-ubuntu)
- * [Install using Debian or Ubuntu's default repositories](#install-using-debian-or-ubuntus-default-repositories)
- * [Install using the MySQL project's Debian and Ubuntu repositories](#install-using-the-mysql-projects-debian-and-ubuntu-repositories)
-* [CentOS and Fedora](#centos-and-fedora)
- * [Install using CentOS or Fedora's default repositories](#install-using-centos-or-fedoras-default-repositories)
- * [Install using the MySQL project's CentOS and Fedora repositories](#install-using-the-mysql-projects-centos-and-fedora-repositories)
+- [Debian and Ubuntu](#debian-and-ubuntu)
+ - [Install using Debian or Ubuntu's default repositories](#install-using-debian-or-ubuntus-default-repositories)
+ - [Install using the MySQL project's Debian and Ubuntu repositories](#install-using-the-mysql-projects-debian-and-ubuntu-repositories)
+- [CentOS and Fedora](#centos-and-fedora)
+ - [Install using CentOS or Fedora's default repositories](#install-using-centos-or-fedoras-default-repositories)
+ - [Install using the MySQL project's CentOS and Fedora repositories](#install-using-the-mysql-projects-centos-and-fedora-repositories)
### Debian and Ubuntu
-You can either choose to use the version of MySQL available in your distribution's default repositories or use repositories provided by the MySQL project. Packages in the default repository are tested to work with all other software provided for your distribution, but may be older. Packages from the MySQL project will be more up-to-date but may require extra configuration.
+You can either choose to use the version of MySQL available in your distribution's default repositories or use repositories provided by the MySQL project. Packages in the default repository are tested to work with all other software provided for your distribution, but may be older. Packages from the MySQL project will be more up-to-date but may require extra configuration.
-* [Install using Debian or Ubuntu's default repositories](#install-using-debian-or-ubuntus-default-repositories)
-* [Install using the MySQL project's Debian and Ubuntu repositories](#install-using-the-mysql-projects-debian-and-ubuntu-repositories)
+- [Install using Debian or Ubuntu's default repositories](#install-using-debian-or-ubuntus-default-repositories)
+- [Install using the MySQL project's Debian and Ubuntu repositories](#install-using-the-mysql-projects-debian-and-ubuntu-repositories)
#### Install using Debian or Ubuntu's default repositories
-Both Ubuntu and Debian provide versions of MySQL server as packages within their default repositories. The MySQL version may be older than those found on the MySQL website, but this is the simplest way to install on these distributions.
+Both Ubuntu and Debian provide versions of MySQL server as packages within their default repositories. The MySQL version may be older than those found on the MySQL website, but this is the simplest way to install on these distributions.
-To install MySQL server, update your computer's local package cache with the latest set of packages. Afterwards, install the `mysql-server` package:
+To install MySQL server, update your computer's local package cache with the latest set of packages. Afterwards, install the `mysql-server` package:
```shell
sudo apt update
@@ -228,27 +228,27 @@ sudo apt install mysql-server
Depending on your version of Ubuntu or Debian, you may be asked to provide and confirm an administrative password for the MySQL server.
-After the installation completes, run the `mysql_secure_installation` script to lock down some of the insecure defaults that may be present. The script will also give you the opportunity to set an administrative password, which you can ignore if you chose one during installation:
+After the installation completes, run the `mysql_secure_installation` script to lock down some of the insecure defaults that may be present. The script will also give you the opportunity to set an administrative password, which you can ignore if you chose one during installation:
```shell
sudo mysql_secure_installation
```
-Read the prompts carefully to decide which actions you wish to take. If you are not sure, answering Y for "yes" is usually a safe option.
+Read the prompts carefully to decide which actions you wish to take. If you are not sure, answering Y for "yes" is usually a safe option.
#### Install using the MySQL project's Debian and Ubuntu repositories
If you need a more up-to-date version of MySQL, you can use the repositories maintained by the MySQL project instead of those provided by your Linux distribution.
-To configure the MySQL project's repository, visit the [download page for the Ubuntu / Debian repository setup package](https://dev.mysql.com/downloads/repo/apt/). Click **download** and save the file to your computer.
+To configure the MySQL project's repository, visit the [download page for the Ubuntu / Debian repository setup package](https://dev.mysql.com/downloads/repo/apt/). Click **download** and save the file to your computer.
-Navigate to the location you downloaded the repository setup package to in your terminal. Install the `.deb` package with the `dpkg` command:
+Navigate to the location you downloaded the repository setup package to in your terminal. Install the `.deb` package with the `dpkg` command:
```shell
sudo dpkg --install mysql-apt-config*.deb
```
-During the package configuration, you'll be asked to choose the version of MySQL you wish to target. If you need to change the version of MySQL that the repository is configured for later, you can type `sudo dpkg-reconfigure mysql-apt-config` to change your selection.
+During the package configuration, you'll be asked to choose the version of MySQL you wish to target. If you need to change the version of MySQL that the repository is configured for later, you can type `sudo dpkg-reconfigure mysql-apt-config` to change your selection.
Once you have selected the version of MySQL to target, you can update the local package list and install MySQL by typing:
@@ -259,24 +259,24 @@ sudo apt install mysql-server
Depending on your version of Ubuntu or Debian, you may be asked to provide and confirm an administrative password for the MySQL server.
-After the installation completes, run the `mysql_secure_installation` script to lock down some of the insecure defaults that may be present. The script will also give you the opportunity to set an administrative password, which you can ignore if you chose one during installation:
+After the installation completes, run the `mysql_secure_installation` script to lock down some of the insecure defaults that may be present. The script will also give you the opportunity to set an administrative password, which you can ignore if you chose one during installation:
```shell
sudo mysql_secure_installation
```
-Read the prompts carefully to decide which actions you wish to take. If you are not sure, answering Y for "yes" is usually a safe option.
+Read the prompts carefully to decide which actions you wish to take. If you are not sure, answering Y for "yes" is usually a safe option.
### CentOS and Fedora
-You can either choose to use the version of MySQL available in your distribution's default repositories or use repositories provided by the MySQL project. Packages in the default repository are tested to work with all other software provided for your distribution, but may be older. Packages from the MySQL project will be more up-to-date but require extra configuration.
+You can either choose to use the version of MySQL available in your distribution's default repositories or use repositories provided by the MySQL project. Packages in the default repository are tested to work with all other software provided for your distribution, but may be older. Packages from the MySQL project will be more up-to-date but require extra configuration.
-* [Install using CentOS or Fedora's default repositories](#install-using-centos-or-fedoras-default-repositories)
-* [Install using the MySQL project's CentOS and Fedora repositories](#install-using-the-mysql-projects-centos-and-fedora-repositories)
+- [Install using CentOS or Fedora's default repositories](#install-using-centos-or-fedoras-default-repositories)
+- [Install using the MySQL project's CentOS and Fedora repositories](#install-using-the-mysql-projects-centos-and-fedora-repositories)
#### Install using CentOS or Fedora's default repositories
-Both CentOS and Fedora provide versions of MySQL server as packages within their default repositories. The MySQL version may be older than those found on the MySQL website, but this is the simplest way to install on these distributions.
+Both CentOS and Fedora provide versions of MySQL server as packages within their default repositories. The MySQL version may be older than those found on the MySQL website, but this is the simplest way to install on these distributions.
To install MySQL server, use your distribution's package manager to install the `mysql-server` package:
@@ -304,21 +304,21 @@ Optionally, you can automatically start MySQL on boot by typing:
sudo systemctl enable mysqld.service
```
-Next, run the `mysql_secure_installation` script to lock down some of the insecure defaults that may be present. The script will let you set an administrative password and other items:
+Next, run the `mysql_secure_installation` script to lock down some of the insecure defaults that may be present. The script will let you set an administrative password and other items:
```shell
sudo mysql_secure_installation
```
-Read the prompts carefully to decide which actions you wish to take. If you are not sure, answering Y for "yes" is usually a safe option.
+Read the prompts carefully to decide which actions you wish to take. If you are not sure, answering Y for "yes" is usually a safe option.
#### Install using the MySQL project's CentOS and Fedora repositories
If you need a more up-to-date version of MySQL, you can use the repositories maintained by the MySQL project instead of those provided by your Linux distribution.
-To configure the MySQL project's repository, visit the [download page for the CentOS / Fedora repository setup package](https://dev.mysql.com/downloads/repo/yum/). Click **download** on the link that matches your distribution (CentOS versions mirror the Red Hat Enterprise version numbers).
+To configure the MySQL project's repository, visit the [download page for the CentOS / Fedora repository setup package](https://dev.mysql.com/downloads/repo/yum/). Click **download** on the link that matches your distribution (CentOS versions mirror the Red Hat Enterprise version numbers).
-Navigate to the location you downloaded the repository setup package to in your terminal. Install the `.rpm` package with your distribution's package manager.
+Navigate to the location you downloaded the repository setup package to in your terminal. Install the `.rpm` package with your distribution's package manager.
For **CentOS** use the `yum` package manager:
@@ -332,7 +332,7 @@ For **Fedora** use the `dnf` package manager:
sudo dnf localinstall mysql*.rpm
```
-If you are using **CentOS 8**, you must also disable the system's MySQL module to prevent it from interfering with the repository's MySQL version. To do so, type:
+If you are using **CentOS 8**, you must also disable the system's MySQL module to prevent it from interfering with the repository's MySQL version. To do so, type:
```shell
sudo yum module disable mysql
@@ -354,14 +354,14 @@ dnf repolist all | grep mysql
After deciding which version to use, disable the current version and enable the desired version.
-For **CentOS**, use the `yum-config-manager` command. For example, this is how you would disable MySQL version 5.7 and enable version 8.0:
+For **CentOS**, use the `yum-config-manager` command. For example, this is how you would disable MySQL version 5.7 and enable version 8.0:
```shell
sudo yum-config-manager --disable mysql57-community
sudo yum-config-manager --enable mysql80-community
```
-For **Fedora** use the `dnf config-manager` command. For example, this is how you would disable MySQL version 5.7 and enable version 8.0:
+For **Fedora** use the `dnf config-manager` command. For example, this is how you would disable MySQL version 5.7 and enable version 8.0:
```shell
sudo dnf config-manager --disable mysql57-community
@@ -394,16 +394,16 @@ Optionally, you can automatically start MySQL on boot by typing:
sudo systemctl enable mysqld.service
```
-When the MySQL server is run for the first time, an administrative password is automatically generated and set. Find the password in the log files by typing:
+When the MySQL server is run for the first time, an administrative password is automatically generated and set. Find the password in the log files by typing:
```shell
sudo grep 'temporary password' /var/log/mysqld.log
```
-Next, run the `mysql_secure_installation` script to lock down some of the insecure defaults that may be present. The script will let you change the administrative password and other items:
+Next, run the `mysql_secure_installation` script to lock down some of the insecure defaults that may be present. The script will let you change the administrative password and other items:
```shell
sudo mysql_secure_installation
```
-Read the prompts carefully to decide which actions you wish to take. If you are not sure, answering Y for "yes" is usually a safe option.
+Read the prompts carefully to decide which actions you wish to take. If you are not sure, answering Y for "yes" is usually a safe option.
diff --git a/content/04-guides/01-database-workflows/01-setting-up-a-database/03-sqlite.mdx b/content/04-guides/01-database-workflows/01-setting-up-a-database/03-sqlite.mdx
index 9da9a5ed3a..41bf6b141a 100644
--- a/content/04-guides/01-database-workflows/01-setting-up-a-database/03-sqlite.mdx
+++ b/content/04-guides/01-database-workflows/01-setting-up-a-database/03-sqlite.mdx
@@ -10,11 +10,11 @@ This page explains how to set up [SQLite](https://www.sqlite.org/index.html) on
This guide will cover the following platforms:
-* [Setting up SQLite on Windows](#setting-up-sqlite-on-windows)
-* [Setting up SQLite on macOS](#setting-up-sqlite-on-macos)
-* [Setting up SQLite on Linux](#setting-up-sqlite-on-linux)
- * [Install using the zipped SQLite tools for Linux](#install-using-the-zipped-sqlite-tools-for-linux)
- * [Install from your distribution's repositories](#install-from-your-distributions-repositories)
+- [Setting up SQLite on Windows](#setting-up-sqlite-on-windows)
+- [Setting up SQLite on macOS](#setting-up-sqlite-on-macos)
+- [Setting up SQLite on Linux](#setting-up-sqlite-on-linux)
+ - [Install using the zipped SQLite tools for Linux](#install-using-the-zipped-sqlite-tools-for-linux)
+ - [Install from your distribution's repositories](#install-from-your-distributions-repositories)
Navigate to the sections that match the platforms you will be working with.
@@ -22,7 +22,7 @@ Navigate to the sections that match the platforms you will be working with.
The SQLite project provides a zipped bundle of tools that include the `sqlite.exe` file that you need to create and interact with SQLite databases from the command line.
-Visit the [SQLite download page](https://www.sqlite.org/download.html) to find a link to the zip file. The archive file you need is under the **Precompiled Binaries for Windows** section and begins with **sqlite-tools**:
+Visit the [SQLite download page](https://www.sqlite.org/download.html) to find a link to the zip file. The archive file you need is under the **Precompiled Binaries for Windows** section and begins with **sqlite-tools**:

@@ -36,7 +36,7 @@ Right-click the file and select **Extract All...** to bring up a new extract win

-Click **Browse...** to select a convenient location to extract the archive's content. For example, to extract the content to the Windows Desktop, select **This PC** followed by **Desktop**:
+Click **Browse...** to select a convenient location to extract the archive's content. For example, to extract the content to the Windows Desktop, select **This PC** followed by **Desktop**:

@@ -50,11 +50,10 @@ If you click the `sqlite3.exe` application, a new window will appear with an int

-Notice that SQLite is currently using an in-memory database. This means that it is not reading from or writing to a file currently.
+Notice that SQLite is currently using an in-memory database. This means that it is not reading from or writing to a file currently.
To make SQLite write to a new database file, type `.open --new` followed by the database file name you wish to use:
-

This will save your existing changes to the given file and continue to use it for the remainder of the session.
@@ -63,9 +62,9 @@ To open up an existing database file, use the `.open` command without the `--new

-You can use the `.databases` command to verify that the database file is being used. Type `.quit` to exit.
+You can use the `.databases` command to verify that the database file is being used. Type `.quit` to exit.
-To access SQLite from the Windows Command Prompt, start a new Command Prompt session from the start menu. Navigate to the folder containing the `sqlite3.exe` file using `cd`. Afterwards, you can execute the application along with a database file to use SQLite with the given file:
+To access SQLite from the Windows Command Prompt, start a new Command Prompt session from the start menu. Navigate to the folder containing the `sqlite3.exe` file using `cd`. Afterwards, you can execute the application along with a database file to use SQLite with the given file:

@@ -75,7 +74,7 @@ Type `.quit` to exit the SQLite session when you are done.
The SQLite project provides a zipped bundle of tools that includes the `sqlite3` command line tool.
-Visit the [SQLite download page](https://www.sqlite.org/download.html) to find a link to the zip file. The archive file you need is under the **Precompiled Binaries for Mac OS X (x86)** section:
+Visit the [SQLite download page](https://www.sqlite.org/download.html) to find a link to the zip file. The archive file you need is under the **Precompiled Binaries for Mac OS X (x86)** section:

@@ -85,11 +84,11 @@ Open the Finder file manager and navigate to the location of the zipped archive:

-Double-click the zip file to extract the contents to a new directory. Inside, you will see a few utilities, including the `sqlite3` tool:
+Double-click the zip file to extract the contents to a new directory. Inside, you will see a few utilities, including the `sqlite3` tool:

-Open your terminal and navigate to the extracted SQLite directory using `cd`. Run the `sqlite3` executable by calling it from the command line:
+Open your terminal and navigate to the extracted SQLite directory using `cd`. Run the `sqlite3` executable by calling it from the command line:
```
./sqlite3
@@ -120,6 +119,7 @@ You can verify the new file is being used with the `.databases` command:
```
.databases
```
+
```
main: /tmp/sqlite-tools-linux-x86-3310100/test.db
```
@@ -150,16 +150,16 @@ Again, type `.quit` when you are finished to return to the command line shell:
## Setting up SQLite on Linux
-Installation methods differ depending on method you use prefer. Follow the section below that matches your needs:
+Installation methods differ depending on method you use prefer. Follow the section below that matches your needs:
-* [Install using the zipped SQLite tools for Linux](#install-using-the-zipped-sqlite-tools-for-linux)
-* [Install from your distribution's repositories](#install-from-your-distributions-repositories)
+- [Install using the zipped SQLite tools for Linux](#install-using-the-zipped-sqlite-tools-for-linux)
+- [Install from your distribution's repositories](#install-from-your-distributions-repositories)
### Install using the zipped SQLite tools for Linux
The SQLite project provides a zipped bundle of tools that includes the `sqlite3` command line tool.
-Visit the [SQLite download page](https://www.sqlite.org/download.html) to find a link to the zip file. The archive file you need is under the **Precompiled Binaries for Linux** section:
+Visit the [SQLite download page](https://www.sqlite.org/download.html) to find a link to the zip file. The archive file you need is under the **Precompiled Binaries for Linux** section:

@@ -171,7 +171,7 @@ Use the `unzip` program or a graphical file manager to extract the contents of t
unzip sqlite-tools-linux*.zip
```
-Navigate into the extracted archive using `cd`. Run the `sqlite3` executable by calling it from the command line:
+Navigate into the extracted archive using `cd`. Run the `sqlite3` executable by calling it from the command line:
```
./sqlite3
@@ -202,6 +202,7 @@ You can verify the new file is being used with the `.databases` command:
```
.databases
```
+
```
main: /tmp/sqlite-tools-linux-x86-3310100/test.db
```
@@ -232,7 +233,7 @@ Again, type `.quit` when you are finished to return to the command line shell:
### Install from your distribution's repositories
-The `sqlite3` command line tool is available in almost all Linux distribution repositories. You can download and install your distribution's package instead of downloading the standalone SQLite zip archive.
+The `sqlite3` command line tool is available in almost all Linux distribution repositories. You can download and install your distribution's package instead of downloading the standalone SQLite zip archive.
The exact commands you need depend on the distribution you are using.
@@ -288,6 +289,7 @@ You can verify the new file is being used with the `.databases` command:
```
.databases
```
+
```
main: /tmp/sqlite-tools-linux-x86-3310100/test.db
```
diff --git a/content/index.mdx b/content/index.mdx
index 3574cdc86f..7cd13b0337 100644
--- a/content/index.mdx
+++ b/content/index.mdx
@@ -12,7 +12,7 @@ Welcome to the Prisma documentation! You can find an overview of the available c
## Table of contents
----
+---
### Getting started
@@ -20,7 +20,7 @@ The **Getting started** section contains _practical guides_ to help you get star
- [Quickstart](./getting-started/quickstart) (5 min)
- Setup Prisma
- - [Add Prisma to an existing project](./getting-started/setup-prisma/add-to-an-existing-project) (15 min)
+ - [Add Prisma to an existing project](./getting-started/setup-prisma/add-to-an-existing-project) (15 min)
- [Start from scratch (SQL migrations)](./getting-started/setup-prisma/start-from-scratch-sql-migrations) (15 min)
---
@@ -34,7 +34,7 @@ The **Understand Prisma** section contains _conceptual_ information about Prisma
- Prisma in your stack
- [REST](./understand-prisma/prisma-in-your-stack/rest)
- [GraphQL](./understand-prisma/prisma-in-your-stack/graphql)
- - [Is Prisma an ORM?](./understand-prisma/prisma-in-your-stack/is-prisma-an-orm)
+ - [Is Prisma an ORM?](./understand-prisma/prisma-in-your-stack/is-prisma-an-orm)
- [Data modeling](./understand-prisma/data-modeling)
- [Under the hood](./understand-prisma/under-the-hood)
diff --git a/gatsby-config.js b/gatsby-config.js
index 1886a3b72a..7b92ccaa26 100644
--- a/gatsby-config.js
+++ b/gatsby-config.js
@@ -49,7 +49,7 @@ module.exports = {
resolve: 'gatsby-source-filesystem',
options: {
name: 'docs',
- path: `${__dirname}/content`,
+ path: `${__dirname}/content/`,
ignore: ['**/.tsx*'],
},
},
diff --git a/package.json b/package.json
index f6f552d62d..1fb7fff296 100644
--- a/package.json
+++ b/package.json
@@ -33,6 +33,7 @@
"react-copy-to-clipboard": "^5.0.2",
"react-dom": "^16.8.4",
"react-helmet": "^5.2.0",
+ "react-hooks-global-state": "^1.0.0",
"react-hooks-testing-library": "^0.3.6",
"react-live": "^2.2.2",
"react-loadable": "^5.5.0",
diff --git a/src/components/layout.css b/src/components/layout.css
index 95f66355c2..09cb1949d3 100644
--- a/src/components/layout.css
+++ b/src/components/layout.css
@@ -50,6 +50,14 @@ h6 > a {
color: #1a202c !important;
}
+h2 code,
+h3 code,
+h4 code,
+h5 code,
+h6 code {
+ font-size: inherit !important;
+}
+
* {
box-sizing: border-box;
}
diff --git a/src/components/layout.tsx b/src/components/layout.tsx
index 37612157f6..068c0ebd70 100644
--- a/src/components/layout.tsx
+++ b/src/components/layout.tsx
@@ -28,9 +28,9 @@ const Layout: React.FunctionComponent = ({ children }) => {
display: flex;
width: 100%;
justify-content: center;
- @media only screen and (max-width: 767px) {
- display: block;
- }
+ // @media only screen and (max-width: 767px) {
+ // display: block;
+ // }
`;
const Content = styled.article`
@@ -43,10 +43,10 @@ const Layout: React.FunctionComponent = ({ children }) => {
`;
const MaxWidth = styled.div`
- @media only screen and (max-width: 50rem) {
- width: 100%;
- position: relative;
- }
+ // @media only screen and (max-width: 50rem) {
+ // width: 100%;
+ // position: relative;
+ // }
> section {
background: #ffffff;
box-shadow: 0px 4px 8px rgba(47, 55, 71, 0.05), 0px 1px 3px rgba(47, 55, 71, 0.1);
diff --git a/src/components/seo.tsx b/src/components/seo.tsx
index dd0aea36e2..f972ad7077 100644
--- a/src/components/seo.tsx
+++ b/src/components/seo.tsx
@@ -12,7 +12,7 @@ type SEOProps = {
const SEO = ({ title, description, keywords }: SEOProps) => (
-
+
{title && {title}}
{description && }
{description && }
diff --git a/src/components/sidebar/tree.tsx b/src/components/sidebar/tree.tsx
index c33c75adad..d5f7b87b99 100644
--- a/src/components/sidebar/tree.tsx
+++ b/src/components/sidebar/tree.tsx
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
import TreeNode from './treeNode';
import { AllEdges } from '../../interfaces/AllArticles.interface';
import { ArticleFields } from '../../interfaces/Article.interface';
+import { createGlobalState } from 'react-hooks-global-state';
interface TreeNode {
node: {
@@ -79,12 +80,14 @@ const calculateTreeData = (edges: any) => {
return tree;
};
+const initialState = { collpased: defaultCollapsed };
+const { useGlobalState } = createGlobalState(initialState);
+
const Tree = ({ edges }: AllEdges) => {
let [treeData] = useState(() => {
return calculateTreeData(edges);
});
-
- const [collapsed, setCollapsed] = useState(defaultCollapsed);
+ const [collapsed, setCollapsed] = useGlobalState('collpased');
const toggle = (label: string) => {
setCollapsed({
diff --git a/src/components/sidebar/treeNode.tsx b/src/components/sidebar/treeNode.tsx
index 337905e690..ddd33b414b 100644
--- a/src/components/sidebar/treeNode.tsx
+++ b/src/components/sidebar/treeNode.tsx
@@ -133,7 +133,8 @@ const TreeNode = ({
items.map((item: any) => (item.lastLevel = true));
hasBorder = true;
}
- return (
+
+ return url === '/' ? null : (
{title && label !== 'index' && url !== '/01-getting-started/04-example' && (
{
if (type === 'lang') {
if (dbSwitcher) {
- if (elm.id.includes('-*-')) { // lang is any
+ if (elm.id.includes('-*-')) {
+ // lang is any
return elm.id.includes(`-${dbSelected}`);
} else {
return (
@@ -58,7 +59,8 @@ const TopSection = ({ location, title, parentTitle, indexPage, langSwitcher, dbS
}
} else if (type === 'db') {
if (langSwitcher) {
- if (elm.id.slice(-1) === '*') { // db is any
+ if (elm.id.slice(-1) === '*') {
+ // db is any
return elm.id.includes(`-${langSelected}`);
} else {
return (
diff --git a/yarn.lock b/yarn.lock
index ddd6a9aa80..9edea3616d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -12195,6 +12195,11 @@ react-helmet@^5.2.0:
react-fast-compare "^2.0.2"
react-side-effect "^1.1.0"
+react-hooks-global-state@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/react-hooks-global-state/-/react-hooks-global-state-1.0.0.tgz#a30580aec8f74327798ec75bf08b44ccb7d0b94f"
+ integrity sha512-yxHtkYz99E3rdRXXa6bFrt+FiLey+qa8H/kVY01A/CuW/UtUpl6BY12gXkWDbvzF9mfweMF4hTOH1jwu5zx4yg==
+
react-hooks-testing-library@^0.3.6:
version "0.3.8"
resolved "https://registry.yarnpkg.com/react-hooks-testing-library/-/react-hooks-testing-library-0.3.8.tgz#717595ed7be500023963dd502f188aa932bf70f0"