public function update($upVersion = null, $force = false)
    {
        $versionInfo = $this->getCurrentVersion();
        $version = intval($versionInfo['version']);
        $increment = 1;
        if ($upVersion !== null && $upVersion < $version) {
            $increment = -1;
        }
        $this->migrate($upVersion, $increment, $force);
    }
public function update($upVersion = null, $force = false)
    {
        $versionInfo = $this->getCurrentVersion();
        $version = intval($versionInfo['version']);
        $increment = 1;
        if ($upVersion !== null && $upVersion < $version) {
            $increment = -1;
        }
        $this->migrate($upVersion, $increment, $force);
    }
public function update ( $ upVersion = null , $ force = false ) { $ versionInfo = $ this -> getCurrentVersion ( ) ; $ version = intval ( $ versionInfo [ 'version' ] ) ; $ increment = 1 ; if ( $ upVersion !== null && $ upVersion < $ version ) { $ increment = - 1 ; } $ this -> migrate ( $ upVersion , $ increment , $ force ) ; }
Run all scripts to up or down the database version from current up to latest version or the specified version.

@param int $upVersion
@param bool $force
@throws \ByJG\DbMigration\Exception\DatabaseDoesNotRegistered
@throws \ByJG\DbMigration\Exception\DatabaseIsIncompleteException
@throws \ByJG\DbMigration\Exception\DatabaseNotVersionedException
@throws \ByJG\DbMigration\Exception\InvalidMigrationFile
@throws \ByJG\DbMigration\Exception\OldVersionSchemaException
Run all scripts to up or down the database version from current up to latest version or the specified version .