Skip to content

Commit 8b5ca0c

Browse files
committed
Add DIRECT_URI on env and prisma
1 parent c63cb23 commit 8b5ca0c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ DEL_INSTANCE=false
2323

2424
# Provider: postgresql | mysql
2525
DATABASE_PROVIDER=postgresql
26+
# DATABASE_DIRECT_URL='' # Direct connection to the database
2627
DATABASE_CONNECTION_URI='postgresql://user:pass@localhost:5432/evolution?schema=public'
2728
# Client name for the database connection
2829
# It is used to separate an API installation from another that uses the same database.

prisma/postgresql-schema.prisma

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ generator client {
99
}
1010

1111
datasource db {
12-
provider = "postgresql"
13-
url = env("DATABASE_CONNECTION_URI")
12+
provider = "postgresql"
13+
url = env("DATABASE_CONNECTION_URI")
14+
directUrl = env("DATABASE_DIRECT_URL")
1415
}
1516

1617
enum InstanceConnectionStatus {

0 commit comments

Comments
 (0)