Merge branch 'main' into style

This commit is contained in:
Aaron Po
2023-05-08 00:05:35 -04:00
committed by GitHub
2 changed files with 13 additions and 3 deletions

View File

@@ -26,6 +26,7 @@ const envSchema = z.object({
POSTGRES_PASSWORD: z.string(),
POSTGRES_DATABASE: z.string(),
POSTGRES_HOST: z.string(),
SHADOW_DATABASE_URL: z.string().url(),
NODE_ENV: z.enum(['development', 'production', 'test']),
SPARKPOST_API_KEY: z.string(),
@@ -187,6 +188,14 @@ export const POSTGRES_DATABASE = parsed.data.POSTGRES_DATABASE;
*/
export const POSTGRES_HOST = parsed.data.POSTGRES_HOST;
/**
* The URL of another PostgreSQL database to shadow.
*
* @example
* 'postgresql://user:password@host:5432/database';
*/
export const SHADOW_DATABASE_URL = parsed.data.SHADOW_DATABASE_URL;
/**
* Node environment.
*

View File

@@ -6,9 +6,10 @@ generator client {
}
datasource db {
provider = "postgresql"
url = env("POSTGRES_PRISMA_URL") // uses connection pooling
directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
provider = "postgresql"
url = env("POSTGRES_PRISMA_URL") // uses connection pooling
directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
}
model User {