system/Commands/Database/MigrateRollback.php
public function run(array $params = [])
	{
		$runner = Services::migrations();

		CLI::write(lang('Migrations.rollingBack'), 'yellow');

		$group = $params['-g'] ?? CLI::getOption('g');

		if (! is_null($group))
		{
			$runner->setGroup($group);
		}
		try
		{
			if (! $this->isAllNamespace($params))
			{
				$namespace = $params['-n'] ?? CLI::getOption('n');
				$runner->version(0, $namespace);
			}
			else
			{
				// Get all namespaces form  PSR4 paths.
				$config     = new Autoload();
				$namespaces = $config->psr4;
				foreach ($namespaces as $namespace => $path)
				{
					$runner->setNamespace($namespace);
					$migrations = $runner->findMigrations();
					if (empty($migrations))
					{
						continue;
					}
					$runner->version(0, $namespace, $group);
				}
			}
			$messages = $runner->getCliMessages();
			foreach ($messages as $message)
			{
				CLI::write($message);
			}

			CLI::write('Done');
		}
		catch (\Exception $e)
		{
			$this->showError($e);
		}
	}
public function run(array $params = [])
	{
		$runner = Services::migrations();

		CLI::write(lang('Migrations.rollingBack'), 'yellow');

		$group = $params['-g'] ?? CLI::getOption('g');

		if (! is_null($group))
		{
			$runner->setGroup($group);
		}
		try
		{
			if (! $this->isAllNamespace($params))
			{
				$namespace = $params['-n'] ?? CLI::getOption('n');
				$runner->version(0, $namespace);
			}
			else
			{
				// Get all namespaces form  PSR4 paths.
				$config     = new Autoload();
				$namespaces = $config->psr4;
				foreach ($namespaces as $namespace => $path)
				{
					$runner->setNamespace($namespace);
					$migrations = $runner->findMigrations();
					if (empty($migrations))
					{
						continue;
					}
					$runner->version(0, $namespace, $group);
				}
			}
			$messages = $runner->getCliMessages();
			foreach ($messages as $message)
			{
				CLI::write($message);
			}

			CLI::write('Done');
		}
		catch (\Exception $e)
		{
			$this->showError($e);
		}
	}
Runs all of the migrations in reverse order, until they have
all been un-applied.

@param array $params