<?php
include_once __DIR__ . '/config/database.php';
$database = new Database();
$db = $database->getConnection();

$queries = [
    "ALTER TABLE users ADD COLUMN IF NOT EXISTS phone VARCHAR(30) DEFAULT NULL",
    "ALTER TABLE users ADD COLUMN IF NOT EXISTS postal_code VARCHAR(20) DEFAULT NULL",
];

foreach ($queries as $i => $q) {
    try {
        $db->exec($q);
        echo "OK " . ($i + 1) . "<br>";
    } catch (PDOException $e) {
        echo "SKIP " . ($i + 1) . ": " . $e->getMessage() . "<br>";
    }
}
echo "Done";
?>
