You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then create an `index.ts` file in the `src` folder to re-export the generated prisma types and the `PrismaClient` instance:
385
385
386
386
```ts file=packages/database/src/index.ts
387
-
export { prisma } from'./client'// exports instance of prisma
388
-
export*from"../generated/prisma"// exports generated types from prisma
387
+
export { prisma } from'./client'// exports instance of prisma
388
+
export*from"../generated/prisma/client"// exports generated types from prisma
389
389
```
390
390
391
391
Follow the [Just-in-Time packaging pattern](https://turbo.build/repo/docs/core-concepts/internal-packages#just-in-time-packages) and create an entrypoint to the package inside `packages/database/package.json`:
Copy file name to clipboardExpand all lines: content/800-guides/150-multiple-databases.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ The `prisma@latest init --db` command:
93
93
94
94
- Connects your CLI to your [Prisma Data Platform](https://console.prisma.io) account. If you are not logged in or do not have an account, your browser will open to guide you through creating a new account or signing into your existing one.
95
95
- Creates a `prisma` directory containing a `schema.prisma` file for your database models.
96
-
- Creates a `.env` file with your `DATABASE_URL` (e.g., for Prisma Postgres it should have something similar to `DATABASE_URL="prisma+postgres://accelerate.prisma-data.net/?api_key=eyJhbGciOiJIUzI..."`).
96
+
- Creates a `.env` file with your `DATABASE_URL` (e.g., `DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require"`).
97
97
98
98
Rename the `prisma` folder to `prisma-user-database`:
99
99
@@ -105,10 +105,10 @@ Edit your `.env` file to rename `DATABASE_URL` to `PPG_USER_DATABASE_URL`:
0 commit comments