src/Neutrino/Database/Migrations/MigrationCreator.php
protected function ensureMigrationDoesntAlreadyExist($name, $path)
    {
        if (class_exists($className = $this->getClassName($name))) {
            throw new InvalidArgumentException("A {$className} class already exists.");
        }

        // TODO Review check for version 2.0
        if(!empty($files = glob($path . '/*_*.php'))){
            foreach ($files as $file) {
                $file = str_replace('.php', '', basename($file));

                $migration = $this->prefix->deletePrefix($file);

                if($className === $this->getClassName($migration)){
                    throw new InvalidArgumentException("A {$className} class already exists.");
                }
            }
        }
    }
protected function ensureMigrationDoesntAlreadyExist($name, $path)
    {
        if (class_exists($className = $this->getClassName($name))) {
            throw new InvalidArgumentException("A {$className} class already exists.");
        }

        // TODO Review check for version 2.0
        if(!empty($files = glob($path . '/*_*.php'))){
            foreach ($files as $file) {
                $file = str_replace('.php', '', basename($file));

                $migration = $this->prefix->deletePrefix($file);

                if($className === $this->getClassName($migration)){
                    throw new InvalidArgumentException("A {$className} class already exists.");
                }
            }
        }
    }
Ensure that a migration with the given name doesn't already exist.

@param  string $name
@param  string $path

@return void

@throws \InvalidArgumentException