public function makeDown($file)
    {
        if (Any::isArray($file)) {
            $success = true;
            foreach ($file as $item) {
                $exec = $this->makeDown($file);
                if (!$exec) {
                    $success = false;
                }
                return $success;
            }
        }

        // check if exists
        if (!File::exist($this->dir . '/' . $file)) {
            return false;
        }

        File::inc($this->dir . '/' . $file, false, false);
        $fullName = Str::cleanExtension($file);
        $class = Str::firstIn($fullName, '-');

        // check if class is instance of migration interface
        if (!class_exists($class) || !is_a($class, 'Ffcms\Core\Migrations\MigrationInterface', true)) {
            return false;
        }

        // init migration and execute down method
        $init = new $class($fullName, $this->connection);
        $init->down();

        return true;
    }
public function makeDown($file)
    {
        if (Any::isArray($file)) {
            $success = true;
            foreach ($file as $item) {
                $exec = $this->makeDown($file);
                if (!$exec) {
                    $success = false;
                }
                return $success;
            }
        }

        // check if exists
        if (!File::exist($this->dir . '/' . $file)) {
            return false;
        }

        File::inc($this->dir . '/' . $file, false, false);
        $fullName = Str::cleanExtension($file);
        $class = Str::firstIn($fullName, '-');

        // check if class is instance of migration interface
        if (!class_exists($class) || !is_a($class, 'Ffcms\Core\Migrations\MigrationInterface', true)) {
            return false;
        }

        // init migration and execute down method
        $init = new $class($fullName, $this->connection);
        $init->down();

        return true;
    }
public function makeDown ( $ file ) { if ( Any :: isArray ( $ file ) ) { $ success = true ; foreach ( $ file as $ item ) { $ exec = $ this -> makeDown ( $ file ) ; if ( ! $ exec ) { $ success = false ; } return $ success ; } } // check if exists if ( ! File :: exist ( $ this -> dir . '/' . $ file ) ) { return false ; } File :: inc ( $ this -> dir . '/' . $ file , false , false ) ; $ fullName = Str :: cleanExtension ( $ file ) ; $ class = Str :: firstIn ( $ fullName , '-' ) ; // check if class is instance of migration interface if ( ! class_exists ( $ class ) || ! is_a ( $ class , 'Ffcms\Core\Migrations\MigrationInterface' , true ) ) { return false ; } // init migration and execute down method $ init = new $ class ( $ fullName , $ this -> connection ) ; $ init -> down ( ) ; return true ; }
Make migration down
@param array|string $file
@return bool
Make migration down