<?php
require_once 'config/db.php';
try {
    $pdo->exec("ALTER TABLE lead_followups ADD COLUMN completed_at DATETIME NULL DEFAULT NULL AFTER status");
    echo 'Column added';
} catch (Exception $e) {
    if (strpos($e->getMessage(), 'Duplicate column name') !== false) {
        echo 'Column already exists';
    } else {
        echo $e->getMessage();
    }
}
