Skip to content

Commit

Permalink
Merge branch 'main' into janpio-patch-4
Browse files Browse the repository at this point in the history
  • Loading branch information
jharrell authored Jun 18, 2024
2 parents 9eb0dfb + c65ceb6 commit 35ef59a
Show file tree
Hide file tree
Showing 174 changed files with 4,409 additions and 2,148 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check-all-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ jobs:
run: npm install

- name: Install remark presets
run: npm install remark-lint-no-dead-urls
run: npm install remark-lint-no-dead-urls remark-custom-header-id

- name: run remark-cli
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
run: |
npx remark-cli . -qf -e=md,mdx --use=remark-mdx --use remark-frontmatter --use remark-gfm \
npx remark-cli . -qf -e=md,mdx --use remark-mdx --use remark-custom-header-id --use remark-frontmatter --use remark-gfm \
--use "remark-lint-no-dead-urls=skipLocalhost:true,skipUrlPatterns:['https://www.notion.so/prismaio','https://www.prisma.io/docs','https://dash.cloudflare.com','https://www.cloudflare.com']"
check-for-dead-internal-links:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/list-changed-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
FILE_PATH=${FILE_PATH#content\/} # remove "content/"
FILE_PATH=${FILE_PATH%.mdx} # remove ".mdx"
FILE_PATH=${FILE_PATH%index} # remove "index"
BRANCH_NAME=${BRANCH_NAME:0:28} # shorten branch name for preview link to a maximum of 28 characters
OUTPUT+="| [${file}](https://www.prisma.io/docs/${FILE_PATH}) | [${file}](https://${BRANCH_NAME//\//-}.docs-51g.pages.dev/${FILE_PATH}) |%0A"
done
else
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/lost-pixel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,28 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Get all changed markdown files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: content/**/*.{md,mdx}

- name: Output relevant files
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.any_changed }}
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
if [ ${CHANGED_FILES} == 'true' ]; then
declare -a linksArray
linksArray=(`echo ${ALL_CHANGED_FILES}`)
for link in "${linksArray[@]}"; do
echo "$link"
done
else
echo "No files changed."
fi
- uses: actions/setup-node@v4
with:
node-version: 18
Expand All @@ -28,6 +50,6 @@ jobs:
run: sed -i -e 's/_/\//g' -e 's|prisma\.io||g' -re 's/(name.+)(\/)(\")/\1-\3/g' lost-pixel-pages.json

- name: Lost Pixel
uses: lost-pixel/lost-pixel@v3.16.0
uses: lost-pixel/lost-pixel@v3.17.0
env:
LOST_PIXEL_API_KEY: ${{ secrets.LOST_PIXEL_API_KEY }}
28 changes: 22 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
# Contributing to Prisma Documentation

We welcome all contributions to the Prisma docs! If you come across some documentation that you feel is missing or incorrect, please open an issue or submit a pull request.
Thank you for wanting to contribute to our docs! If you come across some documentation on [prisma.io/docs](https://www.prisma.io/docs) that you feel is missing or incorrect, please open an issue or submit a pull request.

## I am not sure my changes are valid
## New contributor guide

If you are not sure your changes are valid, then please open an issue and we will discuss it. Contributions from community members are welcome and will be considered for inclusion.
In general, we would recommend you first open an issue before submitting a pull request. In some cases, Prisma contributors may be able to describe the issue or offer a solution. If you would like to try and solve the issue yourself, please feel free to read [our README](./README.md), get set up with the docs repo, and submit a pull request.

## Creating an issue
### I am not sure my changes are valid

If you are not sure your changes are valid, then please still open an issue and we will discuss it. Contributions from community members are welcome and will be considered for inclusion.

### Creating an issue

There are no hard and fast rules for creating an issues to the repository. We only ask that you outline your reasoning for creating the issue and try to provide as much detail as possible. Depending on the issue, this could mean explaining what machine you are working on (Is it a Mac? Are you on a Windows machine?), or including a code snippet that demonstrates the issue.

## Creating a pull request (PR)
If you spot a problem with the docs, [search if an issue already exists](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments). If a related issue doesn't exist, you can open a new issue using a relevant [issue form](https://github.com/github/docs/issues/new/choose).

### Solving an issue

Scan through our [existing issues](https://github.com/github/docs/issues) to find one that interests you. You can narrow down the search using `labels` as filters. See "[Label reference](https://docs.github.com/en/contributing/collaborating-on-github-docs/label-reference)" for more information. As a general rule, we don’t assign issues to anyone. If you find an issue to work on, you are welcome to open a PR with a fix.

We have a pull request template. The basic breakdown is as follows:
### Creating a pull request (PR)

Similar to issues, we do not have hard and fast rules for Pull Requests. If you are opening a pull request we do ask that you:

- Describe the reason for the PR. A little context goes a long way in helping to quickly scan the PR
- Briefly describe what changes were made
- Link to any relevant issues

The Prisma team may ask for changes before a PR can be merged. As these changes are made, please mark the corresponding comments as "resolved". If you need help on a pull request or would like feedback, please feel free to mention the `@Dev-Connections` team.

As a final note, if you're still working on a PR, please utilize the "Draft Pull Request" feature to let us know that your work is not yet ready.

Thank you again for contributing to our documentation!
19 changes: 2 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ To prettify or format the code, run:
npm run format
```

Please note that `.md` and `.mdx` files are not formatted by Prettier because they are written in [MDX 3](https://mdxjs.com/blog/v3/) which Prettier [does not support](https://github.com/prettier/prettier/issues/12209).

Visit `http://localhost:3000` to view the app.

## Configure
Expand Down Expand Up @@ -125,23 +127,6 @@ $ mdtool remove 2
# Result: 01-a, 02-b, 03-c, 04-d becomes 01-a, 02-b, 02-c, 03-d; 02-b is supposed to be manually deleted
```

### Prettier

To align with the current standards specified in our `.prettierc` configuration, it's recommended to include the `pre-commit` hook within the `/.github/` directory. This can be achieved by executing the following commands from the project's root:

```bash
mv /.github/pre-commit /.git/hooks/
```

After that, and upon executing a commit command, you may encounter the following message:

```
hint: The '.git/hooks/pre-commit' hook was ignored because it's not set as executable.
hint: You can disable this warning with `git config advice.ignoredHook false`.
```

To address this, you can follow the provided instructions to disable the `ignoredHook` flag.

#### Thanks Luca

![](https://res.cloudinary.com/prismaio/image/upload/v1628765536/docs/LJ0FGHk_u2jjxv.png)
4 changes: 3 additions & 1 deletion cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@
"Letterpad",
"Hitori",
"Zenstack",
"Streamdal"
"Streamdal",
"leaderboard",
"typesense"
],
"ignoreWords": [
"Ania",
Expand Down
3 changes: 2 additions & 1 deletion content/100-getting-started/01-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Finally, set up Prisma ORM with the `init` command of the Prisma CLI:
npx prisma init --datasource-provider sqlite
```

This creates a new `prisma` directory with your Prisma schema file and configures SQLite as your database. You're now ready to model your data and create your database with some tables.
This creates a new `prisma` directory with a `prisma.schema` file and configures SQLite as your database. You're now ready to model your data and create your database with some tables.

## 2. Model your data in the Prisma schema

Expand Down Expand Up @@ -431,6 +431,7 @@ Check out the [`prisma-examples`](https://github.com/prisma/prisma-examples/) re

The Prisma blog features comprehensive tutorials about Prisma ORM, check out our latest ones:

- [Build a fullstack app with Next.js](https://www.youtube.com/watch?v=QXxy8Uv1LnQ&ab_channel=ByteGrad)
- [Build a fullstack app with Remix](https://www.prisma.io/blog/fullstack-remix-prisma-mongodb-1-7D0BfTXBmB6r) (5 parts, including videos)
- [Build a REST API with NestJS](https://www.prisma.io/blog/nestjs-prisma-rest-api-7D056s1BmOL0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ You can now invoke the Prisma CLI by prefixing it with `npx`:
npx prisma
```

Next, set up your Prisma ORM project by creating your [Prisma schema](/orm/prisma-schema) file with the following command:
Next, set up your Prisma ORM project by creating your [Prisma Schema](/orm/prisma-schema) file with the following command:

```terminal copy
npx prisma init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ You can now invoke the Prisma CLI by prefixing it with `npx`:
npx prisma
```

Next, set up your Prisma ORM project by creating your [Prisma schema](/orm/prisma-schema) file with the following command:
Next, set up your Prisma ORM project by creating your [Prisma Schema](/orm/prisma-schema) file with the following command:

```terminal copy
npx prisma init
```

This command does two things:

- creates a new directory called `prisma` that contains a file called `schema.prisma`, which contains the Prisma schema with your database connection variable and schema models
- creates a new directory called `prisma` that contains a file called `schema.prisma`, which contains the Prisma Schema with your database connection variable and schema models
- creates the [`.env` file](/orm/more/development-environment/environment-variables/env-files) in the root directory of the project, which is used for defining environment variables (such as your database connection)
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ You can now invoke the Prisma CLI by prefixing it with `npx`:
npx prisma
```

Next, set up your Prisma ORM project by creating your [Prisma schema](/orm/prisma-schema) file with the following command:
Next, set up your Prisma ORM project by creating your [Prisma Schema](/orm/prisma-schema) file with the following command:

```terminal copy
npx prisma init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ You can now invoke the Prisma CLI by prefixing it with `npx`:
npx prisma
```

Next, set up your Prisma ORM project by creating your [Prisma schema](/orm/prisma-schema) file with the following command:
Next, set up your Prisma ORM project by creating your [Prisma Schema](/orm/prisma-schema) file with the following command:

```terminal copy
npx prisma init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ You can now invoke the Prisma CLI by prefixing it with `npx`:
npx prisma
```

Next, set up your Prisma ORM project by creating your [Prisma schema](/orm/prisma-schema) file with the following command:
Next, set up your Prisma ORM project by creating your [Prisma Schema](/orm/prisma-schema) file with the following command:

```terminal copy
npx prisma init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ You can now invoke the Prisma CLI by prefixing it with `npx`:
npx prisma
```

Next, set up your Prisma ORM project by creating your [Prisma schema](/orm/prisma-schema) file with the following command:
Next, set up your Prisma ORM project by creating your [Prisma Schema](/orm/prisma-schema) file with the following command:

```terminal copy
npx prisma init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ You can now invoke the Prisma CLI by prefixing it with `npx`:
npx prisma
```

Next, set up your Prisma ORM project by creating your [Prisma schema](/orm/prisma-schema) file with the following command:
Next, set up your Prisma ORM project by creating your [Prisma Schema](/orm/prisma-schema) file with the following command:

```terminal copy
npx prisma init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ You can now invoke the Prisma CLI by prefixing it with `npx`:
npx prisma
```

Next, set up your Prisma ORM project by creating your [Prisma schema](/orm/prisma-schema) file with the following command:
Next, set up your Prisma ORM project by creating your [Prisma Schema](/orm/prisma-schema) file with the following command:

```terminal copy
npx prisma init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ You can now invoke the Prisma CLI by prefixing it with `npx`:
npx prisma
```

Next, set up your Prisma ORM project by creating your [Prisma schema](/orm/prisma-schema) file with the following command:
Next, set up your Prisma ORM project by creating your [Prisma Schema](/orm/prisma-schema) file with the following command:

```terminal copy
npx prisma init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ const deletedUser = await prisma.user.delete({

</details>

### Build an app with Prisma ORM

The Prisma blog features comprehensive tutorials about Prisma ORM, check out our latest ones:

- [Build a fullstack app with Next.js](https://www.youtube.com/watch?v=QXxy8Uv1LnQ&ab_channel=ByteGrad)
- [Build a fullstack app with Remix](https://www.prisma.io/blog/fullstack-remix-prisma-mongodb-1-7D0BfTXBmB6r) (5 parts, including videos)
- [Build a REST API with NestJS](https://www.prisma.io/blog/nestjs-prisma-rest-api-7D056s1BmOL0)

### Explore the data in Prisma Studio

Prisma Studio is a visual editor for the data in your database. Run `npx prisma studio` in your terminal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ You can now invoke the Prisma CLI by prefixing it with `npx`:
npx prisma
```

Next, set up your Prisma ORM project by creating your [Prisma schema](/orm/prisma-schema) file with the following command:
Next, set up your Prisma ORM project by creating your [Prisma Schema](/orm/prisma-schema) file with the following command:

```terminal copy
npx prisma init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ You can now invoke the Prisma CLI by prefixing it with `npx`:
npx prisma
```

Next, set up your Prisma ORM project by creating your [Prisma schema](/orm/prisma-schema) file with the following command:
Next, set up your Prisma ORM project by creating your [Prisma Schema](/orm/prisma-schema) file with the following command:

```terminal copy
npx prisma init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To get started with Prisma Client, you need to install the `@prisma/client` pack
npm install @prisma/client
```

The install command invokes `prisma generate` for you which reads your Prisma schema and generates a version of Prisma Client that is _tailored_ to your models.
The install command invokes `prisma generate` for you which reads your Prisma Schema and generates a version of Prisma Client that is _tailored_ to your models.

![Install and generate Prisma Client](/img/getting-started/prisma-client-install-and-generate.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ const deletedUser = await prisma.user.delete({

</details>

### Build an app with Prisma ORM

The Prisma blog features comprehensive tutorials about Prisma ORM, check out our latest ones:

- [Build a fullstack app with Next.js](https://www.youtube.com/watch?v=QXxy8Uv1LnQ&ab_channel=ByteGrad)
- [Build a fullstack app with Remix](https://www.prisma.io/blog/fullstack-remix-prisma-mongodb-1-7D0BfTXBmB6r) (5 parts, including videos)
- [Build a REST API with NestJS](https://www.prisma.io/blog/nestjs-prisma-rest-api-7D056s1BmOL0)

### Explore the data in Prisma Studio

Prisma Studio is a visual editor for the data in your database. Run `npx prisma studio` in your terminal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ npx prisma db pull

This command reads the environment variable used to define the `url` in your `schema.prisma`, `DATABASE_URL`, that in our case is set in `.env` and connects to your database. Once the connection is established, it introspects the database (i.e. it _reads the database schema_). It then translates the database schema from SQL into a Prisma data model.

After the introspection is complete, your Prisma schema file was updated:
After the introspection is complete, your Prisma schema is updated:

![Introspect your database](/img/getting-started/prisma-db-pull-generate-schema.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ npx prisma db pull

This command reads the `DATABASE_URL` environment variable that's defined in `.env` and connects to your database. Once the connection is established, it introspects the database (i.e. it _reads the database schema_). It then translates the database schema from SQL into a Prisma data model.

After the introspection is complete, your Prisma schema file was updated:
After the introspection is complete, your Prisma schema is updated:

![Introspect your database](/img/getting-started/prisma-db-pull-generate-schema.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ npx prisma db pull

This command reads the `DATABASE_URL` environment variable that's defined in `.env` and connects to your database. Once the connection is established, it introspects the database (i.e. it _reads the database schema_). It then translates the database schema from SQL into a Prisma data model.

After the introspection is complete, your Prisma schema file was updated:
After the introspection is complete, your Prisma schema is updated:

![Introspect your database](/img/getting-started/prisma-db-pull-generate-schema.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ npx prisma db pull

This command reads the `DATABASE_URL` environment variable that's defined in `.env` and connects to your database. Once the connection is established, it introspects the database (i.e. it _reads the database schema_). It then translates the database schema from SQL into a data model in your Prisma schema.

After the introspection is complete, your Prisma schema file was updated:
After the introspection is complete, your Prisma schema is updated:

![Introspect your database with Prisma ORM](/img/getting-started/prisma-db-pull-generate-schema.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ npx prisma db pull

This command reads the `DATABASE_URL` environment variable that's defined in `.env` and connects to your database. Once the connection is established, it introspects the database (i.e. it _reads the database schema_). It then translates the database schema from SQL into a Prisma data model.

After the introspection is complete, your Prisma schema file was updated:
After the introspection is complete, your Prisma schema is updated:

![Introspect your database](/img/getting-started/prisma-db-pull-generate-schema.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ npx prisma db pull

This command reads the environment variable used to define the `url` in your `schema.prisma`, `DATABASE_URL`, that in our case is set in `.env` and connects to your database. Once the connection is established, it introspects the database (i.e. it _reads the database schema_). It then translates the database schema from SQL into a Prisma data model.

After the introspection is complete, your Prisma schema file was updated:
After the introspection is complete, your Prisma schema is updated:

![Introspect your database](/img/getting-started/prisma-db-pull-generate-schema.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ npx prisma db pull

This command reads the `DATABASE_URL` environment variable that's defined in `.env` and connects to your database. Once the connection is established, it introspects the database (i.e. it _reads the database schema_). It then translates the database schema from SQL into a Prisma data model.

After the introspection is complete, your Prisma schema file was updated:
After the introspection is complete, your Prisma schema is updated:

![Introspect your database](/img/getting-started/prisma-db-pull-generate-schema.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ npx prisma db pull

This command reads the `DATABASE_URL` environment variable that's defined in `.env` and connects to your database. Once the connection is established, it introspects the database (i.e. it _reads the database schema_). It then translates the database schema from SQL into a Prisma data model.

After the introspection is complete, your Prisma schema file was updated:
After the introspection is complete, your Prisma schema is updated:

![Introspect your database](/img/getting-started/prisma-db-pull-generate-schema.png)

Expand Down
Loading

0 comments on commit 35ef59a

Please sign in to comment.