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

// Revert users table
$sql1 = "ALTER TABLE users MODIFY COLUMN academic_year YEAR";
if ($conn->query($sql1) === TRUE) {
    echo "users.academic_year reverted to YEAR\n";
} else {
    echo "Error reverting users table: " . $conn->error . "\n";
}

// Revert applications table
$sql2 = "ALTER TABLE applications MODIFY COLUMN academic_year YEAR";
if ($conn->query($sql2) === TRUE) {
    echo "applications.academic_year reverted to YEAR\n";
} else {
    echo "Error reverting applications table: " . $conn->error . "\n";
}

$conn->close();
?>
