'Set migration namespace', '-g' => 'Set database group', '-t' => 'Set table name', ]; /** * Creates a new migration file with the current timestamp. * * @param array $params */ 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', '