<?php
require_once __DIR__ . '/../../app/core/bootstrap.php';
$pdo = crm_pdo();

$tables = ['project_equipment', 'projects', 'project_expenses', 'project_payments', 'work_sessions', 'employee_project_expenses', 'project_partners', 'partner_project_costings'];
$results = [];
foreach ($tables as $t) {
    try {
        $stmt = $pdo->query("SHOW INDEX FROM " . $t);
        $indexes = $stmt->fetchAll(PDO::FETCH_ASSOC);
        $results[$t] = array_column($indexes, 'Column_name');
    } catch (Throwable $e) {}
}
print_r($results);
