Initial commit

This commit is contained in:
Porawit Dongwang
2026-09-16 23:20:08 +07:00
commit 0041668dbb
32577 changed files with 3687927 additions and 0 deletions
@@ -0,0 +1,20 @@
<?php
require __DIR__ . '/../src/Core/Database.php';
$pdo = App\Core\Database::getSystemConnection();
try {
$pdo->exec("ALTER TABLE trip_requests ADD COLUMN cancel_reason TEXT DEFAULT NULL AFTER budget");
echo "Added cancel_reason column.\n";
} catch (Exception $e) { echo "cancel_reason exists.\n"; }
try {
$pdo->exec("ALTER TABLE trip_requests ADD COLUMN revise_reason TEXT DEFAULT NULL AFTER cancel_reason");
echo "Added revise_reason column.\n";
} catch (Exception $e) { echo "revise_reason exists.\n"; }
try {
$pdo->exec("ALTER TABLE trip_requests MODIFY COLUMN status ENUM('Draft', 'Pending', 'Approved', 'Rejected', 'Cancelled', 'Pending Cancel', 'Pending Revise') DEFAULT 'Draft'");
echo "Updated status ENUM.\n";
} catch (Exception $e) { echo "status ENUM error: " . $e->getMessage() . "\n"; }
echo "Migration complete.\n";