<?php
require_once __DIR__ . '/../config/config.php';
$db = Database::getInstance();
$col = $db->fetch("SHOW COLUMNS FROM users LIKE 'on_hold'");
if ($col) {
    echo "Column on_hold already exists\n";
    exit(0);
}
try {
    $db->query("ALTER TABLE users ADD COLUMN on_hold TINYINT(1) NULL DEFAULT 0 AFTER status");
    echo "Added column on_hold\n";
} catch (Exception $e) {
    echo "Failed to add on_hold: " . $e->getMessage() . "\n";
    exit(1);
}
