<?php
require_once 'includes/init.php';

try {
    // Add class_id to questions table
    $sql = "ALTER TABLE questions ADD COLUMN class_id INT DEFAULT NULL";
    $pdo->exec($sql);
    echo "Added class_id column to questions table successfully.<br>";
} catch (PDOException $e) {
    echo "Error adding column (might already exist): " . $e->getMessage() . "<br>";
}

echo "Database update complete.";
?>
