<?php
require 'config.php';

try {
    // SQL to add remember_token column
    $sqlAddToken = "ALTER TABLE users ADD COLUMN remember_token VARCHAR(255) NULL DEFAULT NULL AFTER password";
    $conn->exec($sqlAddToken);
    echo "Column 'remember_token' added successfully.<br>";

    // SQL to add remember_token_expiry column
    $sqlAddExpiry = "ALTER TABLE users ADD COLUMN remember_token_expiry DATETIME NULL DEFAULT NULL AFTER remember_token";
    $conn->exec($sqlAddExpiry);
    echo "Column 'remember_token_expiry' added successfully.<br>";

} catch (PDOException $e) {
    die("Error altering table: " . $e->getMessage());
}
?>
