protected function _migrateFile($version, $filePath, $direction = 'up')
    {
        $classVersion = preg_replace('/[^0-9A-Za-z]/', '', $version);
        $className = 'Migration_' . $classVersion;
        if (file_exists($filePath)) {
            require_once $filePath;
            if (class_exists($className)) {
                $migration = new $className($this->config, $version);
                if ($direction === 'up') {
                    $migration->up();
                    if (method_exists($migration, 'afterUp')) {
                        $migration->afterUp();
                    }
                    print PHP_EOL . Color::success('Upgrade Version ' . $version . ' was successfully migrated') . PHP_EOL;
                } elseif ($direction === 'down') {
                    $migration->down();
                    if (method_exists($migration, 'afterDown')) {
                        $migration->afterDown();
                    }
                    print PHP_EOL . Color::info('Downgrade Version ' . $version . ' was successfully migrated') . PHP_EOL;
                }
            }
        } else {
            throw new CommandsException('Migration class cannot be found ' . $className . ' at ' . $filePath);
        }
    }