Jose
10/18/2022, 4:22 PMDATABASE_URL
?
datasource db {
provider = "postgresql"
url = env(`postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${BRANCH_NAME}?schema=public`)
}
According to the docs, we either set the full string, or a single environment variable (but in this case we want to read the branch name for each environment)Nurul
10/19/2022, 12:38 PMJose
10/23/2022, 10:51 AMNurul
10/25/2022, 2:08 PMDATABASE_USERNAME=test
DATABASE_PASSWORD=test
DATABASE_SCHEMA=public
DATABASE_NAME=test
DATABASE_URL=postgresql://${DATABASE_USERNAME}:${DATABASE_PASSWORD}@localhost:5432/${DATABASE_NAME}?schema=${DATABASE_SCHEMA}
Vladi Stevanovic
Jose
10/26/2022, 5:19 PMNurul
10/26/2022, 6:22 PMJose
10/26/2022, 10:36 PM