private function isMigrated($migration, OutputInterface $output = null)
    {
        if ($this->_db->schema()->hasTable('migrations')) {
            $table = $this->_cap->table('migrations');
            $m = $table->where('migration', '=', $migration);
            if ($m->count() > 0) {
                $item = $m->first();
                if ($item->migrated == 1) {
                    return true;
                }
            }
        } else {
            $this->createMigrationsTable($output);

            return $this->isMigrated($migration);
        }

        return false;
    }