Prefer CRAWLSY_DATABASE_URL for AZ pipeline DB

This commit is contained in:
Kelly
2025-12-02 10:42:43 -07:00
parent 7a76a29acb
commit 16819f756b

View File

@@ -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;