<?php
require_once 'config/db.php';
$log = [];

// 1. Add meeting_type and meeting_link to meetings
try {
    $pdo->exec("ALTER TABLE meetings ADD COLUMN meeting_type ENUM('live_meeting', 'site_visit', 'online_meeting') DEFAULT 'live_meeting' AFTER end_time");
    $log[] = "✅ meetings.meeting_type column added.";
} catch(PDOException $e) { $log[] = "⚠️  meetings.meeting_type: " . $e->getMessage(); }

try {
    $pdo->exec("ALTER TABLE meetings ADD COLUMN meeting_link TEXT NULL DEFAULT NULL AFTER meeting_type");
    $log[] = "✅ meetings.meeting_link column added.";
} catch(PDOException $e) { $log[] = "⚠️  meetings.meeting_link: " . $e->getMessage(); }

echo "<h2>Migration Results</h2>";
foreach ($log as $l) echo "<p>$l</p>";
echo "<p><strong>Migration Completed!</strong></p>";
?>
