<?php
require_once '../core/bootstrap.php';

$db = new Database();
echo "<h1>Updating Users Table Schema...</h1>";

try {
    $db->query("ALTER TABLE users ADD COLUMN phone_number VARCHAR(20) NULL AFTER email");
    $db->execute();
    echo "Success: Added 'phone_number' column.<br>";
} catch (Exception $e) {
    echo "Info: 'phone_number' column likely already exists.<br>";
}

try {
    $db->query("ALTER TABLE users ADD COLUMN profile_picture VARCHAR(255) NULL AFTER role");
    $db->execute();
    echo "Success: Added 'profile_picture' column.<br>";
} catch (Exception $e) {
    echo "Info: 'profile_picture' column likely already exists.<br>";
}

echo "<br><strong>Database update complete.</strong>";
?>