system/Commands/Sessions/CreateMigration.php
public function run(array $params = [])
	{
		$config = new App();

		$tableName = CLI::getOption('t') ?? 'ci_sessions';

		$path = APPPATH . 'Database/Migrations/' . date('YmdHis_') . 'create_' . $tableName . '_table' . '.php';

		$data = [
			'namespace' => CLI::getOption('n') ?? APP_NAMESPACE ?? 'App',
			'DBGroup'   => CLI::getOption('g'),
			'tableName' => $tableName,
			'matchIP'   => $config->sessionMatchIP ?? false,
		];

		$template = view('\CodeIgniter\Commands\Sessions\Views\migration.tpl.php', $data, ['debug' => false]);
		$template = str_replace('@php', '<?php', $template);

		// Write the file out.
		helper('filesystem');
		if (! write_file($path, $template))
		{
			CLI::error(lang('Migrations.migWriteError'));
			return;
		}

		CLI::write('Created file: ' . CLI::color(str_replace(APPPATH, 'APPPATH/', $path), 'green'));
	}
public function run(array $params = [])
	{
		$config = new App();

		$tableName = CLI::getOption('t') ?? 'ci_sessions';

		$path = APPPATH . 'Database/Migrations/' . date('YmdHis_') . 'create_' . $tableName . '_table' . '.php';

		$data = [
			'namespace' => CLI::getOption('n') ?? APP_NAMESPACE ?? 'App',
			'DBGroup'   => CLI::getOption('g'),
			'tableName' => $tableName,
			'matchIP'   => $config->sessionMatchIP ?? false,
		];

		$template = view('\CodeIgniter\Commands\Sessions\Views\migration.tpl.php', $data, ['debug' => false]);
		$template = str_replace('@php', '<?php', $template);

		// Write the file out.
		helper('filesystem');
		if (! write_file($path, $template))
		{
			CLI::error(lang('Migrations.migWriteError'));
			return;
		}

		CLI::write('Created file: ' . CLI::color(str_replace(APPPATH, 'APPPATH/', $path), 'green'));
	}
Creates a new migration file with the current timestamp.

@param array $params