exec($sql); echo "Migration successful: is_active column added to process_definitions table.\n"; } catch (PDOException $e) { // Ignore if column already exists if ($e->getCode() !== '42S21') { die("Migration failed: " . $e->getMessage() . "\n"); } } } // If called directly, run the migration if (basename(__FILE__) == basename($_SERVER["SCRIPT_FILENAME"])) { require_once __DIR__ . '/../../db/config.php'; $pdo = db(); migrate_022($pdo); }