diff --git a/.env b/.env index 38b15b9d..92517f0f 100644 --- a/.env +++ b/.env @@ -4,7 +4,8 @@ # Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. # See the documentation for all the connection string options: https://pris.ly/d/connection-strings -DATABASE_URL="postgresql://next-admin:next-admin@localhost:5432/next-admin?schema=public" +POSTGRES_PRISMA_URL="postgresql://next-admin:next-admin@localhost:5432/next-admin?schema=public" +POSTGRES_URL_NON_POOLING="postgresql://next-admin:next-admin@localhost:5432/next-admin?schema=public" BASE_URL="http://localhost:3000/admin" BASE_DOMAIN="http://localhost:3000" ``` diff --git a/.env.example b/.env.example index 05601fe3..b9bbf766 100644 --- a/.env.example +++ b/.env.example @@ -4,4 +4,5 @@ # Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. # See the documentation for all the connection string options: https://pris.ly/d/connection-strings -DATABASE_URL="postgresql://next-admin:next-admin@localhost:5432/next-admin?schema=public" +POSTGRES_PRISMA_URL="postgresql://next-admin:next-admin@localhost:5432/next-admin?schema=public" +POSTGRES_URL_NON_POOLING="postgresql://next-admin:next-admin@localhost:5432/next-admin?schema=public" diff --git a/apps/example/prisma/schema.prisma b/apps/example/prisma/schema.prisma index fd2b1c76..70b1f118 100644 --- a/apps/example/prisma/schema.prisma +++ b/apps/example/prisma/schema.prisma @@ -11,8 +11,9 @@ generator jsonSchema { } datasource db { - provider = "postgresql" - url = env("DATABASE_URL") + provider = "postgresql" + url = env("POSTGRES_PRISMA_URL") + directUrl = env("POSTGRES_URL_NON_POOLING") } enum Role {