<?php
require_once __DIR__ . '/../config.php';

function migrate_027($pdo) {
    try {
        $sql = "UPDATE process_definitions SET is_active = 0 WHERE name = 'Sales Pipeline'";
        $pdo->exec($sql);
        echo "Migration successful: Deactivated 'Sales Pipeline' process.\n";
    } catch (PDOException $e) {
        die("Migration failed: " . $e->getMessage() . "\n");
    }
}

if (basename(__FILE__) == basename($_SERVER["SCRIPT_FILENAME"])) {
    require_once __DIR__ . '/../../db/config.php';
    $pdo = db();
    migrate_027($pdo);
}

