|
| 1 | +--- |
| 2 | +title: Prisma |
| 3 | +--- |
| 4 | + |
| 5 | +[Prisma Postgres](https://www.prisma.io/postgres) is a fully managed serverless PostgreSQL that focuses on performance, with built-in connection pooling. |
| 6 | + |
| 7 | +You can create a Prisma Postgres instance and use Bytebase to manage the database development lifecycle for those databases. |
| 8 | + |
| 9 | +While Prisma Postgres already has developer-oriented features like branching, Bytebase adds extra value to offer a systematic database development and change workflow. This is especially useful for cross-functional teams requiring collaboration (e.g. having dedicated DBA or platform engineering team apart from the application development teams). |
| 10 | + |
| 11 | +## Prerequisites |
| 12 | + |
| 13 | +- [Sign up](https://console.prisma.io/) for Prisma Postgres, you can sign in with a Github Google account, or email and password. |
| 14 | +- After signing in, you are directed to the Prisma Console where you can [set up your project](https://www.prisma.io/docs/postgres/). |
| 15 | + |
| 16 | +## Procedure |
| 17 | + |
| 18 | +### Step 1 - Set up project on Prisma Postgres and collect connection info |
| 19 | + |
| 20 | +Once you have set up your project, click "Connect" button in the Connect Database card and copy the connection string that is generated for you. |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +With this connection string, we have the following information represented |
| 26 | + |
| 27 | +``` |
| 28 | +postgresql://[username]:[password]@[host][:port]/[dbname][?param1=value1¶m2=value2] |
| 29 | +``` |
| 30 | + |
| 31 | +### Step 2 - Add Prisma Postgres instance to Bytebase |
| 32 | + |
| 33 | +From your Bytebase **Create Instance** page, choose **Add Instance**, fill in the details to create the connection as follows: |
| 34 | + |
| 35 | +1. **Database:** `PostgreSQL`. |
| 36 | +2. **Instance Name:** any name of your choosing, e.g. `ppg-bb`. |
| 37 | +3. **Environment:** `Prod` or `Test` (select the environment you want to add the instance to). |
| 38 | +4. **Host or Socket:** the **host** section of the connection string: `db.prisma.io` |
| 39 | +5. **Port:** 5432 (Prisma Postgres uses the default PostgreSQL port of 5432 to connect) |
| 40 | +6. **Username:** copy the **username** section of the connection string |
| 41 | +7. **Password:** copy the **password** section of the connection string |
| 42 | +8. **Database:** copy the **dbname** section of the connection string: `postgres` |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | +See [Add an Instance](/get-started/step-by-step/add-an-instance) for more details. |
| 47 | + |
| 48 | +### Step 3 - Check if the database instance is properly imported |
| 49 | + |
| 50 | +All databases should be synced properly. Expect some delay if the database instance is large. |
| 51 | + |
| 52 | +So should the tables under the databases. |
| 53 | + |
| 54 | + |
0 commit comments