<?php
require_once __DIR__ . '/../app/core/bootstrap.php';
$pdo = crm_pdo();
$stmt = $pdo->query("SHOW TABLES");
$tables = $stmt->fetchAll(PDO::FETCH_COLUMN);
$result = [];
foreach ($tables as $t) {
    if (strpos($t, 'city') !== false || strpos($t, 'distance') !== false) {
        $st = $pdo->query("DESCRIBE $t");
        $result[$t] = $st->fetchAll(PDO::FETCH_ASSOC);
    }
}
echo json_encode($result);
