<?php
require_once 'config/database.php';
try {
    $tables = ['vehicles', 'drivers', 'users', 'fuel_companies'];
    foreach ($tables as $table) {
        echo "Table: $table\n";
        $stmt = $pdo->prepare("DESCRIBE $table");
        $stmt->execute();
        $columns = $stmt->fetchAll(PDO::FETCH_ASSOC);
        foreach($columns as $col) {
            if ($col['Key'] === 'PRI') {
                echo "  Primary Key: {$col['Field']} - {$col['Type']}\n";
            }
        }
        echo "\n";
    }
} catch (Exception $e) {
    echo 'Error: ' . $e->getMessage();
}
?>