public function makeUp($file)
    {
        // check if argument is array of files and run recursion
        if (Any::isArray($file)) {
            $success = true;
            foreach ($file as $single) {
                $exec = $this->makeUp($single);
                if (!$exec) {
                    $success = false;
                }
            }
            return $success;
        }

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

        // check if migration file located in extend directory and copy to default
        if (Normalize::diskFullPath($this->dir) !== Normalize::diskFullPath(static::DEFAULT_DIR)) {
            File::copy($this->dir . DIRECTORY_SEPARATOR . $file, static::DEFAULT_DIR . DIRECTORY_SEPARATOR . $file);
        }

        // include migration and get class name
        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;
        }

        // implement migration
        $init = new $class($fullName, $this->connection);
        $init->up();
        $init->seed();

        return true;
    }
public function makeUp($file)
    {
        // check if argument is array of files and run recursion
        if (Any::isArray($file)) {
            $success = true;
            foreach ($file as $single) {
                $exec = $this->makeUp($single);
                if (!$exec) {
                    $success = false;
                }
            }
            return $success;
        }

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

        // check if migration file located in extend directory and copy to default
        if (Normalize::diskFullPath($this->dir) !== Normalize::diskFullPath(static::DEFAULT_DIR)) {
            File::copy($this->dir . DIRECTORY_SEPARATOR . $file, static::DEFAULT_DIR . DIRECTORY_SEPARATOR . $file);
        }

        // include migration and get class name
        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;
        }

        // implement migration
        $init = new $class($fullName, $this->connection);
        $init->up();
        $init->seed();

        return true;
    }
public function makeUp ( $ file ) { // check if argument is array of files and run recursion if ( Any :: isArray ( $ file ) ) { $ success = true ; foreach ( $ file as $ single ) { $ exec = $ this -> makeUp ( $ single ) ; if ( ! $ exec ) { $ success = false ; } } return $ success ; } // check if migration file is exists if ( ! File :: exist ( $ this -> dir . '/' . $ file ) ) { return false ; } // check if migration file located in extend directory and copy to default if ( Normalize :: diskFullPath ( $ this -> dir ) !== Normalize :: diskFullPath ( static :: DEFAULT_DIR ) ) { File :: copy ( $ this -> dir . DIRECTORY_SEPARATOR . $ file , static :: DEFAULT_DIR . DIRECTORY_SEPARATOR . $ file ) ; } // include migration and get class name 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 ; } // implement migration $ init = new $ class ( $ fullName , $ this -> connection ) ; $ init -> up ( ) ; $ init -> seed ( ) ; return true ; }
Run migration up
@param string|array $file
@return bool
Run migration up