How to set up a development and production database with Prisma

I'm trying to set up two databases with prisma but there isn't much info available. I am trying to use a local postgres db for my dev db and supabase for my prod db.

datasource db {
    provider = "postgresql"
    // NOTE: When using postgresql, mysql or sqlserver, uncomment the @db.Text annotations in model Account below
    // Further reading:
    // https://next-auth.js.org/adapters/prisma#create-the-prisma-schema
    // https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#string
    url      = env("DATABASE_URL")
}

datasource development {
    provider = "postgresql"
    url      = env("DEV_DATABASE_URL")
}

This is giving me an error in the schema file so im not sure how to go about doing this.
Was this page helpful?