<?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: "applyMigrationFile.php"
 * $argv[1] => File with script to execute
 * $argv[2] => Organization ID
 */

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