Prefer CRAWLSY_DATABASE_URL for AZ pipeline DB
This commit is contained in:
@@ -7,11 +7,15 @@
|
|||||||
|
|
||||||
import { Pool, PoolClient } from 'pg';
|
import { Pool, PoolClient } from 'pg';
|
||||||
|
|
||||||
// Environment variable for Dutchie AZ database (falls back to main DB with schema prefix)
|
// Consolidated DB naming:
|
||||||
|
// - Prefer CRAWLSY_DATABASE_URL (e.g., crawlsy_local, crawlsy_prod)
|
||||||
|
// - Then DUTCHIE_AZ_DATABASE_URL (legacy)
|
||||||
|
// - Finally DATABASE_URL (legacy main DB)
|
||||||
const DUTCHIE_AZ_DATABASE_URL =
|
const DUTCHIE_AZ_DATABASE_URL =
|
||||||
|
process.env.CRAWLSY_DATABASE_URL ||
|
||||||
process.env.DUTCHIE_AZ_DATABASE_URL ||
|
process.env.DUTCHIE_AZ_DATABASE_URL ||
|
||||||
process.env.DATABASE_URL ||
|
process.env.DATABASE_URL ||
|
||||||
'postgresql://dutchie:dutchie_local_pass@localhost:54320/dutchie_az';
|
'postgresql://dutchie:dutchie_local_pass@localhost:54320/crawlsy_local';
|
||||||
|
|
||||||
let pool: Pool | null = null;
|
let pool: Pool | null = null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user