<?php
include 'includes/db.php';

// Add status and is_favorite columns
$sql1 = "ALTER TABLE job_applications ADD COLUMN IF NOT EXISTS status ENUM('active', 'bin') DEFAULT 'active'";
$sql2 = "ALTER TABLE job_applications ADD COLUMN IF NOT EXISTS is_favorite TINYINT(1) DEFAULT 0";

if ($conn->query($sql1) === TRUE) {
    echo "Column 'status' added/checked successfully.<br>";
} else {
    echo "Error adding column 'status': " . $conn->error . "<br>";
}

if ($conn->query($sql2) === TRUE) {
    echo "Column 'is_favorite' added/checked successfully.<br>";
} else {
    echo "Error adding column 'is_favorite': " . $conn->error . "<br>";
}

echo "Job features setup complete. You can delete this file now.";
?>
