36326-vm/db/setup_volunteer_dashboard.php
2025-11-26 15:44:00 +00:00

20 lines
626 B
PHP

<?php
require_once 'config.php';
try {
$pdo = db();
// Add more statuses to the food_listings table
try {
$sql_alter = "ALTER TABLE food_listings MODIFY status ENUM('available', 'claimed', 'collected', 'assigned', 'en-route', 'delivered') DEFAULT 'available'";
$pdo->exec($sql_alter);
echo "Altered 'food_listings' table to add more delivery statuses.\n";
} catch (PDOException $e) {
echo "Could not alter 'food_listings' table (maybe statuses already exist). Error: " . $e->getMessage() . "\n";
}
} catch (PDOException $e) {
die("DB ERROR: " . $e->getMessage());
}