<?php
// Script to add phone column to users table
require_once 'includes/config.php';
require_once 'includes/db.php';

try {
    // Add phone column to users table
    $sql = "ALTER TABLE users ADD COLUMN phone VARCHAR(20) DEFAULT NULL";
    $pdo->exec($sql);
    
    echo "Phone column added successfully to users table.\n";
} catch (PDOException $e) {
    if (strpos($e->getMessage(), 'Duplicate column name') !== false) {
        echo "Phone column already exists in users table.\n";
    } else {
        echo "Error adding phone column: " . $e->getMessage() . "\n";
    }
}
?>