<?php
session_start();
require_once '../config/database.php';
if (!isset($_SESSION['user_id']) || $_SESSION['user_role'] !== 'admin') {
    die('Admin only');
}
try {
    $pdo->exec("ALTER TABLE subject_mark_distribution MODIFY COLUMN exam_type ENUM('midterm','final','test','assignment','practical','all','default') NOT NULL DEFAULT 'default'");
    echo "<p style='color:green;font-family:sans-serif;'>✅ Migration সফল! exam_type column এ <strong>default</strong> ও <strong>all</strong> value যোগ হয়েছে।</p>";
    echo "<p><a href='setup.php'>← Setup এ ফিরে যান</a></p>";
} catch (Exception $e) {
    echo "<p style='color:red;font-family:sans-serif;'>❌ ত্রুটি: " . htmlspecialchars($e->getMessage()) . "</p>";
}
