<?php
session_start();
include '../includes/auth_admin.php';
include '../includes/db.php';

try {
    $pdo->exec("ALTER TABLE event_participants ADD COLUMN sort_order INT DEFAULT 0");
    echo "✅ Column `sort_order` added successfully.";
} catch (PDOException $e) {
    if (strpos($e->getMessage(), 'Duplicate column name') !== false) {
        echo "ℹ️ Column `sort_order` already exists.";
    } else {
        echo "❌ Error: " . $e->getMessage();
    }
}
?>
