<?php

require_once './bootstrapMigration.php';

$instanceManager = \Zeedhi\Framework\DependencyInjection\InstanceManager::getInstance();
/** @var \Teknisa\Libs\Service\Migration $migrationService */
$migrationService = $instanceManager->getService('migrationService');

/**
 * $argv[0] => Current file name: "applyMigration.php"
 * $argv[1] => Script to execute
 * $argv[2] => Organization ID
 */

$scriptOutput = $migrationService->applyMigration($argv[1], $argv[2]);
echo json_encode($scriptOutput);