#!/usr/bin/env php
<?php

if (!(class_exists('Composer\\Autoload\\ClassLoader', false))) {
    // Trying to get main autoload (if is used as package)
    if (file_exists(__DIR__ . '/../../../autoload.php')) {
        require_once __DIR__ . '/../../../autoload.php';
        // Trying to get local autoload (if is used as project)
    } elseif (file_exists(__DIR__ . '/../vendor/autoload.php')) {
        require_once __DIR__ . '/../vendor/autoload.php';
    } else {
        throw new UnexpectedValueException('No autoloader found');
    }
}

use Odan\Migration\Command\GenerateCommand;

$application = new \Phinx\Console\PhinxApplication();
$application->add(new GenerateCommand());
$application->run();
