<?php

function migrate_002($pdo) {
    $sql = "CREATE TABLE IF NOT EXISTS calendar_events (
        id INT AUTO_INCREMENT PRIMARY KEY,
        title VARCHAR(255) NOT NULL,
        description TEXT,
        start_datetime DATETIME NOT NULL,
        end_datetime DATETIME NOT NULL,
        type VARCHAR(50) NOT NULL, -- 'meeting', 'training'
        created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
    );";
    $pdo->exec($sql);
    echo "Migration 002 applied: Created calendar_events table.\n";
}


