src/RocknRoot/StrayFw/Database/Migration.php
public function migrate(Request $req)
    {
        if (count($req->getArgs()) != 1) {
            echo 'Wrong arguments.' . PHP_EOL . 'Usage : db/migration/migrate mapping_name' . PHP_EOL;
        } else {
            $mappingName = $req->getArgs()[0];
            $mapping = Mapping::get($mappingName);
            $cl = '\\' . ltrim(rtrim($mapping['config']['provider'], '\\'), '\\') . '\\Migration::migrate';
            if (is_callable($cl) === false) {
                throw new RuntimeException(
                    'Migration migrate method is not callable on configured provider!'
                );
            }
            call_user_func($cl, $mapping);
            echo 'Migrate - Done' . PHP_EOL;
        }
    }
public function migrate(Request $req)
    {
        if (count($req->getArgs()) != 1) {
            echo 'Wrong arguments.' . PHP_EOL . 'Usage : db/migration/migrate mapping_name' . PHP_EOL;
        } else {
            $mappingName = $req->getArgs()[0];
            $mapping = Mapping::get($mappingName);
            $cl = '\\' . ltrim(rtrim($mapping['config']['provider'], '\\'), '\\') . '\\Migration::migrate';
            if (is_callable($cl) === false) {
                throw new RuntimeException(
                    'Migration migrate method is not callable on configured provider!'
                );
            }
            call_user_func($cl, $mapping);
            echo 'Migrate - Done' . PHP_EOL;
        }
    }
Run migration code for a mapping.

@param Request $req current CLI request