<?php
require_once __DIR__ . '/config.php';

try {
    $conn_rbe = new PDO(DB_DSN, DB_USER, DB_PASS, [
        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
        PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
        PDO::ATTR_EMULATE_PREPARES => false,
    ]);
} catch (PDOException $e) {
    die('DB ERROR (rbe): ' . $e->getMessage());
}

// Compatibility alias retained for legacy code paths in the delivered fork.
$conn_main = $conn_rbe;
