Supaglue + Prisma
There are two recommended ways to use Prisma with your application depending on whether your Supaglue Destination is your production database:
- If you're using a Supaglue-hosted Destination or a Destination different from your production database, follow the multiple databases section below.
- If you're using a Supaglue Destination that's the same as your production database, follow the multiple schemas section below.
We recommend you generate a second Prisma client - one for your production database and one for the Supaglue Destination database.
This way, you continue to use your existing client as is and follow the workflow for using Prisma with an existing project for the Supaglue Destination database.
We recommend you use Prisma's
multiSchema feature to continue using your existing Prisma client.
This approach involves turning on the
multiSchema preview feature, declaring a Supaglue schema in your
schema.prisma file, and introspecting Supaglue's models so you can continue to use your existing client for both your current models and Supaglue's models.