diff --git a/backend/src/dutchie-az/db/connection.ts b/backend/src/dutchie-az/db/connection.ts index 552a61bf..29d31412 100644 --- a/backend/src/dutchie-az/db/connection.ts +++ b/backend/src/dutchie-az/db/connection.ts @@ -7,11 +7,15 @@ 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 = + process.env.CRAWLSY_DATABASE_URL || process.env.DUTCHIE_AZ_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;