src/mako/application/cli/commands/migrations/Command.php
protected function getMigrated(?int $batches = null): ResultSet
	{
		$query = $this->builder();

		if($batches !== null && $batches > 0)
		{
			$query->where('batch', '>', ($this->builder()->max('batch') - $batches));
		}

		return $query->select(['version', 'package'])->descending('version')->all();
	}
protected function getMigrated(?int $batches = null): ResultSet
	{
		$query = $this->builder();

		if($batches !== null && $batches > 0)
		{
			$query->where('batch', '>', ($this->builder()->max('batch') - $batches));
		}

		return $query->select(['version', 'package'])->descending('version')->all();
	}
protected function getMigrated ( ? int $ batches = null ) : ResultSet { $ query = $ this -> builder ( ) ; if ( $ batches !== null && $ batches > 0 ) { $ query -> where ( 'batch' , '>' , ( $ this -> builder ( ) -> max ( 'batch' ) - $ batches ) ) ; } return $ query -> select ( [ 'version' , 'package' ] ) -> descending ( 'version' ) -> all ( ) ; }
Returns migrations that have been run.

@param  int|null                       $batches Number of batches fetch
@return \mako\database\query\ResultSet
Returns migrations that have been run .