Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
a30e0f0
continue docs
nikolasburk Mar 25, 2020
32559fb
Merge branch 'master' of github.com:prisma/prisma2-docs into content/…
nikolasburk Mar 25, 2020
94387aa
continue docs
nikolasburk Mar 25, 2020
eaf63db
continue docs
nikolasburk Mar 25, 2020
8aef877
Merge branch 'master' of github.com:prisma/prisma2-docs into content/…
nikolasburk Mar 25, 2020
92641e5
continue docs
nikolasburk Mar 25, 2020
9e310bd
Merge branch 'master' of github.com:prisma/prisma2-docs into content/…
nikolasburk Mar 25, 2020
2ba3253
continue docs
nikolasburk Mar 25, 2020
ab2b826
continue docs
nikolasburk Mar 25, 2020
843741d
continue docs
nikolasburk Mar 25, 2020
a49a310
Tech switcher
nilubava Mar 26, 2020
c9a8c8d
Select route
nilubava Mar 26, 2020
913817c
ajdust sidenav
nikolasburk Mar 27, 2020
0549b26
ajdust sidenav
nikolasburk Mar 27, 2020
68e2ed8
improve introduction
nikolasburk Mar 27, 2020
abd1ffe
Merge branch 'master' into content/init
nikolasburk Mar 27, 2020
84a1250
resolve merge conflict
nikolasburk Mar 27, 2020
046aeaa
Merge branch 'content/init' of github.com:prisma/prisma2-docs into co…
nikolasburk Mar 27, 2020
190614f
add landing page and adjust sidenav
nikolasburk Mar 27, 2020
ec94755
continue docs
nikolasburk Mar 27, 2020
6b039f0
continue docs
nikolasburk Mar 27, 2020
3e52a6b
landing page content
nikolasburk Mar 27, 2020
3b97ca3
continue docs
nikolasburk Mar 27, 2020
e4c5eb1
Merge branch 'master' of github.com:prisma/prisma2-docs into content/…
nikolasburk Mar 27, 2020
86ab3f3
Merge branch 'tech-switcher' of github.com:prisma/prisma2-docs into c…
nikolasburk Mar 27, 2020
4381320
continue docs
nikolasburk Mar 27, 2020
97cd0cb
default lang, db
nilubava Mar 27, 2020
e7dabc8
Merge branch 'tech-switcher' of github.com:prisma/prisma2-docs into c…
nikolasburk Mar 27, 2020
50432a8
Merged master
nilubava Mar 27, 2020
ff7134b
Bug fix for table
nilubava Mar 27, 2020
41ebbd3
add more tech combos for getting started
nikolasburk Mar 27, 2020
a23e07a
Added '*' to tech switcher + changed mongodb to sqlite
nilubava Mar 27, 2020
c58c9a5
Merged master
nilubava Mar 27, 2020
c704ea5
start new relation syntax
nikolasburk Mar 27, 2020
de76d03
new tech switcher
nikolasburk Mar 27, 2020
6cc181c
relations update
nikolasburk Mar 27, 2020
d046350
relations update
nikolasburk Mar 27, 2020
2d4e973
relations update
nikolasburk Mar 27, 2020
2b73996
relations update
nikolasburk Mar 27, 2020
6b6fc97
relations update
nikolasburk Mar 28, 2020
d13ffa4
resolve merge conflict
nikolasburk Mar 28, 2020
c4e9876
update quickstart with new relation syntax
nikolasburk Mar 28, 2020
27072f7
update setup guides with new relation syntax and more tech combos
nikolasburk Mar 28, 2020
2b8b56b
fix build
nikolasburk Mar 28, 2020
c357c83
fix build
nikolasburk Mar 28, 2020
fd43e21
adjhust to new relation syntax
nikolasburk Mar 28, 2020
4e9ff8f
adjhust to new relation syntax
nikolasburk Mar 28, 2020
97dd603
relation docs
nikolasburk Mar 28, 2020
ce24bf8
relation docs
nikolasburk Mar 28, 2020
8dd9e78
relation docs
nikolasburk Mar 28, 2020
9c49070
relation docs
nikolasburk Mar 28, 2020
303cca3
relation docs
nikolasburk Mar 28, 2020
f821b03
continue docs
nikolasburk Mar 28, 2020
52d1641
continue docs content
nikolasburk Mar 29, 2020
854d159
update links in GSE
nikolasburk Mar 29, 2020
edd560c
update links in Introduction
nikolasburk Mar 29, 2020
545eb3f
update links in Understand Prisma
nikolasburk Mar 29, 2020
956c844
update links in schema reference
nikolasburk Mar 29, 2020
f7b4565
update links in prisma client reference
nikolasburk Mar 29, 2020
3419891
update links in prisma client reference
nikolasburk Mar 29, 2020
0dfa33f
reslove merge conflicts
nikolasburk Mar 29, 2020
410b2a3
reslove merge conflicts
nikolasburk Mar 29, 2020
da4e519
reslove merge conflicts
nikolasburk Mar 29, 2020
c7a05f0
update links on more reference pages
nikolasburk Mar 29, 2020
d4b23df
update links on more reference pages
nikolasburk Mar 29, 2020
4a31f35
continue docs content
nikolasburk Mar 29, 2020
6b0e448
wrap up fixing links
nikolasburk Mar 29, 2020
59297da
wrap up fixing links
nikolasburk Mar 29, 2020
2f340bc
fix build
nikolasburk Mar 30, 2020
af525ce
Merge branch 'master' into content/init
nikolasburk Mar 30, 2020
7460033
fix build
nikolasburk Mar 30, 2020
fe7933f
Merge branch 'content/init' of github.com:prisma/prisma2-docs into co…
nikolasburk Mar 30, 2020
6f9cfdc
Merge branch 'master' of github.com:prisma/prisma2-docs into content/…
nikolasburk Mar 30, 2020
e1a3eec
attempt to fix build
nikolasburk Mar 30, 2020
109f12a
attempt to fix build
nikolasburk Mar 30, 2020
768d026
attempt to fix build
nikolasburk Mar 30, 2020
7adc701
attempt to fix build
nikolasburk Mar 30, 2020
7e4a63c
attempt to fix build
nikolasburk Mar 30, 2020
0f05de4
attempt to fix build
nikolasburk Mar 30, 2020
7dfb1d3
Merge branch 'master' into content/init
nikolasburk Mar 30, 2020
080b302
fix content on landing page
nikolasburk Mar 30, 2020
4f6c4d7
Merge branch 'content/init' of github.com:prisma/prisma2-docs into co…
nikolasburk Mar 30, 2020
7970762
add meta data
nikolasburk Mar 30, 2020
5c8ea9f
add meta data
nikolasburk Mar 30, 2020
e35217f
add meta data
nikolasburk Mar 30, 2020
1d6c173
add meta data
nikolasburk Mar 30, 2020
0b53474
Merge branch 'master' of github.com:prisma/prisma2-docs into content/…
nikolasburk Mar 30, 2020
230e672
add meta data
nikolasburk Mar 30, 2020
44bc580
add meta data
nikolasburk Mar 30, 2020
f2c411b
add meta data
nikolasburk Mar 30, 2020
d274c64
adjust diagrams
nikolasburk Mar 30, 2020
ba5a85f
adjust diagrams
nikolasburk Mar 30, 2020
e9f87be
Merge branch 'master' into content/init
nikolasburk Mar 30, 2020
bc895e3
fix link for supported platforms
nikolasburk Mar 30, 2020
b4e3428
Merge branch 'content/init' of github.com:prisma/prisma2-docs into co…
nikolasburk Mar 30, 2020
68463eb
Merge branch 'master' of github.com:prisma/prisma2-docs into content/…
nikolasburk Mar 30, 2020
519ce51
fix build
nikolasburk Mar 30, 2020
9604357
adjust diagrams
nikolasburk Mar 30, 2020
a9bed65
resolve merge conflict
nikolasburk Mar 30, 2020
973f9c1
fix TS link
nikolasburk Mar 30, 2020
90fca26
continue docs content
nikolasburk Mar 30, 2020
602d7f2
add guide for prisma migrate
nikolasburk Mar 30, 2020
f53e8a2
adjust URL of GSE guide
nikolasburk Mar 31, 2020
63fbbd0
adjust URL of GSE guide
nikolasburk Mar 31, 2020
aa8389e
update landing page
nikolasburk Mar 31, 2020
e16706d
resolve merge conflict
nikolasburk Mar 31, 2020
18b4307
improve next steps in quickstart
nikolasburk Mar 31, 2020
7527d9c
fix build
nikolasburk Mar 31, 2020
50ef5d2
fix build
nikolasburk Mar 31, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions content/01-getting-started/01-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This page explains how to get started with Prisma in five minutes. You will lear
For the demo purposes of this guide, you will use a local [SQLite](https://www.sqlite.org/) database file. This guide does _not_ cover the Prisma setup process. If you're looking to set up Prisma with your own database, you have these options:

- [Setup a new project with Prisma from scratch](./setup-prisma/start-from-scratch-sql)
- [Add Prisma to an existing project](./setup-prisma/add-to-an-existing-project)
- [Add Prisma to an existing project](./setup-prisma/add-to-existing-project)

## Prerequisites

Expand Down Expand Up @@ -502,21 +502,27 @@ const deletedUser = await prisma.user.delete({

### Setup Prisma with your own database

To learn how to connect Prisma to your own database, you can follow the respective setup guide:
To learn how to connect Prisma to your own database, you can follow the respective setup guide.

**Setup a new project from scratch**

The following two guides both explain how you can setup a new project from scratch using your own database as well as howw to send queries with Prisma Client. The first one uses SQL migrations and [introspection](../reference/tools-and-interfaces/introspection), the second one uses [Prisma Migrate](../reference/tools-and-interfaces/prisma-migrate) as the main Prisma workflow.

<ButtonLink color="dark" type="primary" href="./setup-prisma/start-from-scratch-sql">
Setup a new project from scratch
SQL migrations
</ButtonLink>

<br />
<br />

<ButtonLink color="dark" type="primary" href="./setup-prisma/add-to-an-existing-project">
Add Prisma to an existing project
<ButtonLink color="dark" type="primary" href="./setup-prisma/start-from-scratch-prisma-migrate">
Prisma Migrate
</ButtonLink>

<!-- - [Setup a new project with Prisma from scratch](./setup-prisma/start-from-scratch-sql)
- [Add Prisma to an existing project](./setup-prisma/add-to-an-existing-project) -->
**Add Prisma to an existing npm project**

When adding Prisma to an already existing no project, you can obtain your initial data model from [introspection](../reference/tools-and-interfaces/introspection).

<ButtonLink color="dark" type="primary" href="./setup-prisma/add-to-existing-project">
Add Prisma to existing project
</ButtonLink>

---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'Add to an existing project'
title: 'Add to existing project'
metaTitle: 'Add Prisma to an existing project (15 min)'
metaDescription: 'Learn how to add Prisma to an existing Node.js or TypeScript project by connecting it to your database and generating Prisma Client for database access.'
dbSwitcher: true
Expand Down
1 change: 1 addition & 0 deletions content/01-getting-started/04-example.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dbSwitcher: true

This page won't be shown in sidebar. For now, h2 tags cannot be written inside `SwitchTech` block. But still can include headings using `<h3>, <h4>` tags and not using `### headings`.
`<h2>` tags wont be shown in TOC yet.

<ButtonLink color="dark" type="primary" href="https://prisma2.netlify.com/getting-started/quickstart" target="_blank">
Quickstart (5 min)
</ButtonLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The setup instruction below provide a high-level overview of the steps needed to
<br />
<br />

<ButtonLink color="dark" type="primary" href="../../../getting-started/setup-prisma/add-to-an-existing-project">
<ButtonLink color="dark" type="primary" href="../../../getting-started/setup-prisma/add-to-existing-project">
Add Prisma to an existing project
</ButtonLink>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metaDescription: 'Learn how you can introspect your database to generate a data

You can introspect your database using the Prisma CLI in order to generate the [data model](./prisma-schema/data-model) in your [Prisma schema](./prisma-schema/prisma-schema-file). The data model is needed to [generate Prisma Client](../prisma-client/configuring-the-prisma-client-api).

Introspection is often used to generate an _initial_ version of the data model when [adding Prisma to an existing project](../../getting-started/setup-prisma/add-to-an-existing-project).
Introspection is often used to generate an _initial_ version of the data model when [adding Prisma to an existing project](../../getting-started/setup-prisma/add-to-existing-project).

However, it can also be used _repeatedly_ in an application. This is most commonly the case when you're _not_ using [Prisma Migrate](./prisma-migrate) but perform schema migrations using plain SQL or another migration tool. In that case, you also need to re-introspect your database and subsequently re-generate Prisma Client to reflect the schema changes in your [Prisma Client API](../prisma-client/api).

Expand Down
10 changes: 0 additions & 10 deletions content/05-more/05-faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ Learn more on the [Debugging](../reference/tools-and-interfaces/prisma-client/de

Prisma Client is not opinionated on how exactly you migrate your database schema (e.g. create new tables, alter columns, ...). You can keep your existing migration system and re-[introspect](../reference/tools-and-interfaces/introspection) your database schema after each schema migration. You can also use Prisma Migrate to run your migrations based on Prisma's declarative [data model definition](../reference/tools-and-interfaces/prisma-schema/data-model).

## Is Prisma Client production-ready? Should I start using it?

Although it's officially in beta, Prisma Client is considered production-ready. This means you can start using it in mission critical applications. Note that there might still be breaking changes as Prisma Client continues to be developed.

## Does Prisma Client support GraphQL schema delegation and GraphQL binding?

GraphQL [schema delegation](https://www.prisma.io/blog/graphql-schema-stitching-explained-schema-delegation-4c6caf468405/) connects two GraphQL schemas by passing the [`info`](https://www.prisma.io/blog/graphql-server-basics-demystifying-the-info-argument-in-graphql-resolvers-6f26249f613a/) object from a resolver of the first GraphQL schema to a resolver of the second GraphQL schema. Schema delegation also is the foundation for [GraphQL binding](https://github.com/graphql-binding/graphql-binding).
Expand All @@ -64,12 +60,6 @@ Each migration is represented via its own directory on your file system inside a

Each of these migration directories contains detailed information about the respective migration, for example which steps are executed (and in what order) as well as a human-friendly Markdown file that summarizes the most important information about the migration, such as the source and the target [data model definition](../reference/tools-and-interfaces/prisma-schema/data-model) of the migration. This information can also be found in the `_Migrations` table in your database/schema.

## Is Prisma Migrate production-ready? Should I start using it?

Prisma Migrate is currently in an experimental state. It has a number of issues that don't make it suitable for production uses. You can track the progress of the release process on [isprisma2ready.com](https://www.isprisma2ready.com).

While it shouldn't be used for mission critical applications yet, Prisma Migrate is definitely in a usable state. You can help us accelerate the release process by using it and [sharing your feedback](https://github.com/prisma/prisma2) with us.

## Since Prisma 2.0 is released, will Prisma 1 still be maintained?

Yes, Prisma 1 will continue to be maintained. However, most Prisma engineering and support resources will go into the development of [Prisma 2.0](https://github.com/prisma/prisma2).
Expand Down
52 changes: 43 additions & 9 deletions content/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,18 @@ metaDescription: 'Welcome to the Prisma documentation! Get started with Prisma a

## Overview

Welcome to the Prisma documentation! You can find an overview of the available content in the sections below. The fastest way to get started with Prisma is the [**Quickstart**](./getting-started/quickstart).
Welcome to the Prisma documentation! You can find an overview of the available content in the sections below.

> **If you're using Prisma 1, please refer to the [Prisma 1 documentation](https://www.prisma.io/docs/1.34).**

## Explore
The fastest way to get started with Prisma is the **Quickstart**. Alternatively you can read the **Introduction** to get a high-level overview of what Prisma is and how it works.

<ButtonLink color="dark" type="primary" href="./setup-prisma/add-to-an-existing-project">
<ButtonLink color="dark" type="primary" href="./getting-started/quickstart">
Quickstart (5 min)
</ButtonLink>

<br />
<br />

<ButtonLink color="dark" type="primary" href="./setup-prisma/start-from-scratch-sql">
Read Prisma introduction
<ButtonLink color="dark" type="primary" href="./getting-started/quickstart">
Prisma introduction
</ButtonLink>


Expand All @@ -34,7 +31,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-existing-project) (15 min)
- [Start from scratch (SQL migrations)](./getting-started/setup-prisma/start-from-scratch-sql-migrations) (15 min)

---
Expand Down Expand Up @@ -148,3 +145,40 @@ The **More** section contains _meta information_ about Prisma and the documentat
- [FAQ](./more/faq)
- [Limitations](./more/limitations)
- [Roadmap](./more/roadmap)

## Need help?

Prisma has a large and supportive [community](https://prisma.io/community) of enthusiastic application developers which is most active on [Slack](https://slack.prisma.io) and on [GitHub](https://github.com/prisma/prisma).

### Ask a question about Prisma

You can ask questions and initiate [discussions](https://github.com/prisma/prisma2/discussions/) about Prisma-related topics in the `prisma` repository on GitHub.

<ButtonLink color="dark" type="primary" href="https://github.com/prisma/prisma2/discussions/new">
Ask a question
</ButtonLink>

<br />
<br />

### Create a bug report for Prisma

If you see an error message or run into an issue, please make sure to create a bug report! You can find [best practices for creating bug reports](./more/creating-bug-reports) (like including additional debugging output) in these docs.

<ButtonLink color="dark" type="primary" href="https://github.com/prisma/prisma/issues/new?assignees=&labels=&template=bug_report.md&title=">
Create bug report
</ButtonLink>


<br />
<br />

### Submit a feature request

If Prisma currently doesn't have a certain, be sure to check out the [roadmap](./more/roadmap) to see if this is already planned for the future.

If the feature on the roadmap is linked to a GitHub issue, please make sure to leave a +1 on the issue and ideally a comment with your thoughts about the feature!

<ButtonLink color="dark" type="primary" href="https://github.com/prisma/prisma2/issues/new?assignees=&labels=&template=feature_request.md&title=">
Submit feature request
</ButtonLink>
1 change: 1 addition & 0 deletions src/components/customMdx/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const backgroundColorMap = {

export const ButtonWrapper = withProps<ButtonProps>(styled.a)`
padding: 11px 14px;
margin-right: 10px;
display: inline-flex;
align-items: center;
${p => (p.block ? 'width: 100%;' : '')}
Expand Down
Loading