<?php

use Wibiesana\Padi\Core\DatabaseManager;

return new class {
    public function up(): void
    {
        $db = DatabaseManager::connection();
        
        // Add file_path to mous table if not exists
        $db->exec("ALTER TABLE mous ADD COLUMN file_path VARCHAR(255) NULL AFTER status");
        
        // Add attachments to internships table if not exists
        $db->exec("ALTER TABLE internships ADD COLUMN attachments TEXT NULL AFTER advisor_score");
        
        echo "✓ Altered mous and internships tables successfully\n";
    }

    public function down(): void
    {
        $db = DatabaseManager::connection();
        
        $db->exec("ALTER TABLE mous DROP COLUMN file_path");
        $db->exec("ALTER TABLE internships DROP COLUMN attachments");
        
        echo "✓ Rolled back alterations successfully\n";
    }
};
