Skip to content

Commit

Permalink
Update 850-using-prisma-with-planetscale.mdx
Browse files Browse the repository at this point in the history
Add in explanation of promoting main branch
  • Loading branch information
Lucy Keer committed Jan 27, 2022
1 parent 871c1cc commit 933876d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ PlanetScale's branching model and design for scalability means that there are al

When connecting to PlanetScale with Prisma, you will need to use the correct connection string for your branch. The connection URL for a given database branch can be found from your PlanetScale account by going to the overview page for the branch and selecting the 'Connect' dropdown. In the 'Passwords' section, generate a new password and select 'Prisma' from the dropdown to get the Prisma format for the connection URL. See Prisma's [Getting Started guide](/getting-started/setup-prisma/start-from-scratch/relational-databases/connect-your-database-typescript-planetscale) for more details of how to connect to a PlanetScale database.

Note that you can only push new changes to a development branch, not a production branch. If you try to push to a production branch, you will get the [error message](/reference/api-reference/error-reference#p3022) `Direct execution of DDL (Data Definition Language) SQL statements is disabled on this database.` Once you are happy with the changes you make on a development branch, you can create a [deploy request](https://docs.planetscale.com/concepts/branching#create-a-deploy-request), which you can then review before deploying the changes to production.
Every PlanetScale database is created with a branch called `main`, which is initially a development branch that you can use to test schema changes on. Once you are happy with the changes you make there, you can [promote it](https://docs.planetscale.com/concepts/branching#branch-promotion) to become a production branch. Note that you can only push new changes to a development branch, so further changes will need to be created on a separate development branch and then later deployed to production using a [deploy request](https://docs.planetscale.com/concepts/branching#create-a-deploy-request).

If you try to push to a production branch, you will get the [error message](/reference/api-reference/error-reference#p3022) `Direct execution of DDL (Data Definition Language) SQL statements is disabled on this database.`

## How to enable emulation of referential integrity

Expand Down

0 comments on commit 933876d

Please sign in to comment.