20 lines
626 B
PHP
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());
|
|
}
|
|
|